From: Alan Modra Date: Fri, 7 Oct 2011 23:06:09 +0000 (+0000) Subject: * elflink.c (elf_link_output_extsym): Strip defined plugin symbols X-Git-Tag: sid-snapshot-20111101~263 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d56d55e7af730af390a97d844e32c47e4c1240fb;p=thirdparty%2Fbinutils-gdb.git * elflink.c (elf_link_output_extsym): Strip defined plugin symbols even when strip_discarded is false. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7e858e2d7a6..e2d28e67e36 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2011-10-08 Alan Modra + + * elflink.c (elf_link_output_extsym): Strip defined plugin symbols + even when strip_discarded is false. + 2011-10-05 Kai Tietz * coffgen.c (coff_write_alien_symbol): Don't write diff --git a/bfd/elflink.c b/bfd/elflink.c index 5d181f7993c..3ae4350684c 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)