2804 * Now that all input sections have been analyzed, and prior to placing
2805 * any input sections to their output sections, process any groups.
2806 * Groups can contribute COMDAT items, which may get discarded as part
2807 * of placement. In addition, COMDAT names may require transformation
2808 * to indicate different output section placement.
2809 */
2810 if (ifl->ifl_flags & FLG_IF_GROUPS) {
2811 for (ndx = 1; ndx < ifl->ifl_shnum; ndx++) {
2812 Is_desc *isp;
2813
2814 if (((isp = ifl->ifl_isdesc[ndx]) == NULL) ||
2815 (isp->is_shdr->sh_type != SHT_GROUP))
2816 continue;
2817
2818 if (ld_group_process(isp, ofl) == S_ERROR)
2819 return (S_ERROR);
2820 }
2821 }
2822
2823 /*
2824 * Now that all of the input sections have been processed, place
2825 * them in the appropriate output sections.
2826 */
2827 for (ndx = 1; ndx < ifl->ifl_shnum; ndx++) {
2828 Is_desc *isp;
2829
2830 if (((isp = ifl->ifl_isdesc[ndx]) == NULL) ||
2831 ((isp->is_flags & FLG_IS_PLACE) == 0))
2832 continue;
2833
2834 /*
2835 * Place all non-ordered sections within their appropriate
2836 * output section.
2837 */
2838 if ((isp->is_flags & FLG_IS_ORDERED) == 0) {
2839 if (ld_place_section(ofl, isp, path_info,
2840 isp->is_keyident, NULL) == (Os_desc *)S_ERROR)
2841 return (S_ERROR);
2842 continue;
2843 }
|
2804 * Now that all input sections have been analyzed, and prior to placing
2805 * any input sections to their output sections, process any groups.
2806 * Groups can contribute COMDAT items, which may get discarded as part
2807 * of placement. In addition, COMDAT names may require transformation
2808 * to indicate different output section placement.
2809 */
2810 if (ifl->ifl_flags & FLG_IF_GROUPS) {
2811 for (ndx = 1; ndx < ifl->ifl_shnum; ndx++) {
2812 Is_desc *isp;
2813
2814 if (((isp = ifl->ifl_isdesc[ndx]) == NULL) ||
2815 (isp->is_shdr->sh_type != SHT_GROUP))
2816 continue;
2817
2818 if (ld_group_process(isp, ofl) == S_ERROR)
2819 return (S_ERROR);
2820 }
2821 }
2822
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 /*
2832 * Now that all of the input sections have been processed, place
2833 * them in the appropriate output sections.
2834 */
2835 for (ndx = 1; ndx < ifl->ifl_shnum; ndx++) {
2836 Is_desc *isp;
2837
2838 if (((isp = ifl->ifl_isdesc[ndx]) == NULL) ||
2839 ((isp->is_flags & FLG_IS_PLACE) == 0))
2840 continue;
2841
2842 /*
2843 * Place all non-ordered sections within their appropriate
2844 * output section.
2845 */
2846 if ((isp->is_flags & FLG_IS_ORDERED) == 0) {
2847 if (ld_place_section(ofl, isp, path_info,
2848 isp->is_keyident, NULL) == (Os_desc *)S_ERROR)
2849 return (S_ERROR);
2850 continue;
2851 }
|