Print this page
3638 ld confuses files with group sections and files that should lazy load

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/libld/common/files.c
          +++ new/usr/src/cmd/sgs/libld/common/files.c
↓ open down ↓ 2335 lines elided ↑ open up ↑
2336 2336          uintptr_t       error;
2337 2337  
2338 2338          error = process_section(name, ifl, shdr, scn, ndx, ident, ofl);
2339 2339          if ((error == 0) || (error == S_ERROR))
2340 2340                  return (error);
2341 2341  
2342 2342          /*
2343 2343           * Indicate that this input file has groups to process.  Groups are
2344 2344           * processed after all input sections have been processed.
2345 2345           */
2346      -        ifl->ifl_flags |= FLG_IS_GROUPS;
     2346 +        ifl->ifl_flags |= FLG_IF_GROUPS;
2347 2347  
2348 2348          return (1);
2349 2349  }
2350 2350  
2351 2351  /*
2352 2352   * Process a relocation entry. At this point all input sections from this
2353 2353   * input file have been assigned an input section descriptor which is saved
2354 2354   * in the `ifl_isdesc' array.
2355 2355   */
2356 2356  static uintptr_t
↓ open down ↓ 443 lines elided ↑ open up ↑
2800 2800                  }
2801 2801          }
2802 2802  
2803 2803          /*
2804 2804           * Now that all input sections have been analyzed, and prior to placing
2805 2805           * any input sections to their output sections, process any groups.
2806 2806           * Groups can contribute COMDAT items, which may get discarded as part
2807 2807           * of placement.  In addition, COMDAT names may require transformation
2808 2808           * to indicate different output section placement.
2809 2809           */
2810      -        if (ifl->ifl_flags & FLG_IS_GROUPS) {
     2810 +        if (ifl->ifl_flags & FLG_IF_GROUPS) {
2811 2811                  for (ndx = 1; ndx < ifl->ifl_shnum; ndx++) {
2812 2812                          Is_desc *isp;
2813 2813  
2814 2814                          if (((isp = ifl->ifl_isdesc[ndx]) == NULL) ||
2815 2815                              (isp->is_shdr->sh_type != SHT_GROUP))
2816 2816                                  continue;
2817 2817  
2818 2818                          if (ld_group_process(isp, ofl) == S_ERROR)
2819 2819                                  return (S_ERROR);
2820 2820                  }
↓ open down ↓ 896 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX