https://sourceware.org/bugzilla/show_bug.cgi?id=32219

--- Comment #3 from Nick Clifton <nickc at redhat dot com> ---
Created attachment 15722
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15722&action=edit
Proposed patch

Hi H.J.

  How about this proposed patch instead ?

  It modifies the orphan placement algorithm to test to see if the anchor
section for orphaned NOTES exists before using it:

+    {
+      /* PR 32219: Check that the .interp section
+        exists before attaching orphans to it.  */
+      if (lang_output_section_find (hold[orphan_interp].name))
+       place = &hold[orphan_interp];
+      /* Next best place: after .rodata.  */
+      else if (lang_output_section_find (hold[orphan_rodata].name))
+       place = &hold[orphan_rodata];
+      /* Last attempt: the .text section.  */
+      else
+       place = &hold[orphan_text];
+    }

It also tweaks various linker script files for targets that might benefit and
then adds XFAILS to the pr23658-1e test for the remaining unhandled targets.

What do you think ?

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to