summaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2011-12-07 12:15:49 +0000
committerAlan Modra <amodra@bigpond.net.au>2011-12-07 12:15:49 +0000
commit6e9b3a6a39327a8366fceb71721fca8ef5fa4d10 (patch)
treef6529838042fba284e90919ad5a84a4cc8672f8e /bfd/elflink.c
parentc0f8ae5b461755aad7cbfd3abf3b1d092ce79c63 (diff)
downloadbinutils-redhat-6e9b3a6a39327a8366fceb71721fca8ef5fa4d10.tar.gz
PR ld/12772
* elflink.c (elf_gc_sweep_symbol): Discard unmarked symbols defined in shared libraries.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index ac95c22332..1d1ca0bce4 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -11725,7 +11725,8 @@ elf_gc_sweep_symbol (struct elf_link_hash_entry *h, void *data)
if (!h->mark
&& (((h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
- && !h->root.u.def.section->gc_mark)
+ && !(h->def_regular
+ && h->root.u.def.section->gc_mark))
|| h->root.type == bfd_link_hash_undefined
|| h->root.type == bfd_link_hash_undefweak))
{