[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/20513] GNU ld does not ignore symbols defined in sections marked
From: |
amodra at gmail dot com |
Subject: |
[Bug ld/20513] GNU ld does not ignore symbols defined in sections marked EXCLUDE |
Date: |
Sat, 27 Aug 2016 01:34:21 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=20513
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amodra at gmail dot com
--- Comment #3 from Alan Modra <amodra at gmail dot com> ---
My gut feeling is that it would be better to deal with this as we do with other
sections that are discarded early in the link.
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -2294,6 +2294,12 @@ section_already_linked (bfd *abfd, asection *sec, void
*data)
return;
}
+ /* Deal with SHF_EXCLUDE ELF sections. */
+ if (!bfd_link_relocatable (&link_info)
+ && (abfd->flags & BFD_PLUGIN) == 0
+ && (sec->flags & (SEC_GROUP | SEC_KEEP | SEC_EXCLUDE)) == SEC_EXCLUDE)
+ sec->output_section = bfd_abs_section_ptr;
+
if (!(abfd->flags & DYNAMIC))
bfd_section_already_linked (abfd, sec, &link_info);
}
--
You are receiving this mail because:
You are on the CC list for the bug.