PR ld/12772
authorAlan Modra <amodra@gmail.com>
Wed, 7 Dec 2011 12:15:54 +0000 (12:15 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 7 Dec 2011 12:15:54 +0000 (12:15 +0000)
* elflink.c (elf_gc_sweep_symbol): Discard unmarked symbols
defined in shared libraries.

bfd/ChangeLog
bfd/elflink.c

index a6f8c6f7f56d49f184e21f2d46bbcc1a51dabdee..6b1e88a4875261f011d6a2e1f1e1f43302fd8840 100644 (file)
@@ -1,3 +1,9 @@
+2011-12-07  Alan Modra  <amodra@gmail.com>
+
+       PR ld/12772
+       * elflink.c (elf_gc_sweep_symbol): Discard unmarked symbols
+       defined in shared libraries.
+
 2011-12-07  Tristan Gingold  <gingold@adacore.com>
 
        * mach-o.c (bfd_mach_o_canonicalize_symtab): Fix indentation.
index ac95c223325920e9a5af1bcddd9e946a409160ff..1d1ca0bce44987d3383ea7e0188cc85719a4a1ef 100644 (file)
@@ -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))
     {
This page took 0.033632 seconds and 4 git commands to generate.