From: Alan Modra Date: Wed, 7 Dec 2011 12:15:54 +0000 (+0000) Subject: PR ld/12772 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6673f753c019;p=binutils-gdb.git PR ld/12772 * elflink.c (elf_gc_sweep_symbol): Discard unmarked symbols defined in shared libraries. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a6f8c6f7f56..6b1e88a4875 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2011-12-07 Alan Modra + + PR ld/12772 + * elflink.c (elf_gc_sweep_symbol): Discard unmarked symbols + defined in shared libraries. + 2011-12-07 Tristan Gingold * mach-o.c (bfd_mach_o_canonicalize_symtab): Fix indentation. diff --git a/bfd/elflink.c b/bfd/elflink.c index ac95c223325..1d1ca0bce44 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)) {