aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-12-07 12:15:54 +0000
committerAlan Modra <amodra@gmail.com>2011-12-07 12:15:54 +0000
commit6673f753c019918af9fc3eb97543e2c3a90460b9 (patch)
treeb43c293608133bc516f464560e3df4795894589e /bfd/elflink.c
parentafbb9e17e41abd51e78f31bfaa1ade56cb232d39 (diff)
downloadgdb-6673f753c019918af9fc3eb97543e2c3a90460b9.zip
gdb-6673f753c019918af9fc3eb97543e2c3a90460b9.tar.gz
gdb-6673f753c019918af9fc3eb97543e2c3a90460b9.tar.bz2
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 ac95c22..1d1ca0b 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))
{