* elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark syms in
authorAlan Modra <amodra@gmail.com>
Tue, 8 Nov 2011 13:49:11 +0000 (13:49 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 8 Nov 2011 13:49:11 +0000 (13:49 +0000)
executables when export_dynamic.

bfd/ChangeLog
bfd/elflink.c

index b145c5758f19fcfde48c5bfe60431529175fdab2..14db95fe397c6a7766564e3de7533d5700cd1f60 100644 (file)
@@ -1,3 +1,8 @@
+2011-11-09  Alan Modra  <amodra@gmail.com>
+
+       * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark syms in
+       executables when export_dynamic.
+
 2011-11-08  Alan Modra  <amodra@gmail.com>
 
        * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename
index 4f55d9aa151bf68838d6c5b0d289e698e6f13254..1dab6a39cac840668f2168c952a8721be80651b8 100644 (file)
@@ -11947,7 +11947,7 @@ bfd_elf_gc_mark_dynamic_ref_symbol (struct elf_link_hash_entry *h, void *inf)
   if ((h->root.type == bfd_link_hash_defined
        || h->root.type == bfd_link_hash_defweak)
       && (h->ref_dynamic
-         || (!info->executable
+         || ((!info->executable || info->export_dynamic)
              && h->def_regular
              && ELF_ST_VISIBILITY (h->other) != STV_INTERNAL
              && ELF_ST_VISIBILITY (h->other) != STV_HIDDEN