Print this page
3616 SHF_GROUP sections should not be discarded via other COMDAT mechanisms
3709 need sloppy relocation for GNU .debug_macro
Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Reviewed by: Robert Mustacchi <rm@joyent.com>

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 ↓ 2813 lines elided ↑ open up ↑
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                  }
2821 2821          }
2822 2822  
2823 2823          /*
     2824 +         * Now group information has been processed, we can safely validate
     2825 +         * that nothing is fishy about the section COMDAT description.  We
     2826 +         * need to do this prior to placing the section (where any
     2827 +         * SHT_SUNW_COMDAT sections will be restored to being PROGBITS)
     2828 +         */
     2829 +        ld_comdat_validate(ofl, ifl);
     2830 +
     2831 +        /*
2824 2832           * Now that all of the input sections have been processed, place
2825 2833           * them in the appropriate output sections.
2826 2834           */
2827 2835          for (ndx = 1; ndx < ifl->ifl_shnum; ndx++) {
2828 2836                  Is_desc *isp;
2829 2837  
2830 2838                  if (((isp = ifl->ifl_isdesc[ndx]) == NULL) ||
2831 2839                      ((isp->is_flags & FLG_IS_PLACE) == 0))
2832 2840                          continue;
2833 2841  
↓ open down ↓ 883 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX