diff options
author | Alan Modra <amodra@bigpond.net.au> | 2011-10-07 23:06:07 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2011-10-07 23:06:07 +0000 |
commit | 56e5a96802cf2f0ffdc2cd64c7f577ac6e74107a (patch) | |
tree | f6a4136854d8dab8240a53d825fa5e11f01481ad /bfd | |
parent | 49c059943fb1c535c03e9c404e2e2f97ebc5caa3 (diff) | |
download | binutils-redhat-56e5a96802cf2f0ffdc2cd64c7f577ac6e74107a.tar.gz |
* elflink.c (elf_link_output_extsym): Strip defined plugin symbols
even when strip_discarded is false.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elflink.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7e858e2d7a..e2d28e67e3 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2011-10-08 Alan Modra <amodra@gmail.com> + + * elflink.c (elf_link_output_extsym): Strip defined plugin symbols + even when strip_discarded is false. + 2011-10-05 Kai Tietz <ktietz@redhat.com> * coffgen.c (coff_write_alien_symbol): Don't write diff --git a/bfd/elflink.c b/bfd/elflink.c index 5d181f7993..3ae4350684 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -8679,10 +8679,12 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) && bfd_hash_lookup (finfo->info->keep_hash, h->root.root.string, FALSE, FALSE) == NULL) strip = TRUE; - else if (finfo->info->strip_discarded - && (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - && elf_discarded_section (h->root.u.def.section)) + else if ((h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + && ((finfo->info->strip_discarded + && elf_discarded_section (h->root.u.def.section)) + || (h->root.u.def.section->owner != NULL + && (h->root.u.def.section->owner->flags & BFD_PLUGIN) != 0))) strip = TRUE; else if ((h->root.type == bfd_link_hash_undefined || h->root.type == bfd_link_hash_undefweak) |