diff options
author | Alan Modra <amodra@gmail.com> | 2016-08-26 22:01:15 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2016-08-31 19:22:43 +0930 |
commit | 2e84f9c1b5770b803b739bcd157d7a457c22b56f (patch) | |
tree | 82947fd0615d2c660f894fd6f7c2ea21d5c6ee92 /ld/ldlang.c | |
parent | 8a37735f20f4cbd0cba49d49e57974faf8b9f19b (diff) | |
download | gdb-2e84f9c1b5770b803b739bcd157d7a457c22b56f.zip gdb-2e84f9c1b5770b803b739bcd157d7a457c22b56f.tar.gz gdb-2e84f9c1b5770b803b739bcd157d7a457c22b56f.tar.bz2 |
Ignore symbols defined in SHF_EXCLUDE sections
PR 20513
* ldlang.c (section_already_linked): Deal with SHF_EXCLUDE sections.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index aee8720..07c2182 100644 --- 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); } |