aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-10-07 23:06:09 +0000
committerAlan Modra <amodra@gmail.com>2011-10-07 23:06:09 +0000
commitd56d55e7af730af390a97d844e32c47e4c1240fb (patch)
treefda75d2fa07f53ea1dde771c21e45c6f12142c63 /bfd/elflink.c
parent9c15afc467bfda43425d9d7f024168534b44396c (diff)
downloadbinutils-d56d55e7af730af390a97d844e32c47e4c1240fb.zip
binutils-d56d55e7af730af390a97d844e32c47e4c1240fb.tar.gz
binutils-d56d55e7af730af390a97d844e32c47e4c1240fb.tar.bz2
* elflink.c (elf_link_output_extsym): Strip defined plugin symbols
even when strip_discarded is false.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 5d181f7..3ae4350 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)