aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-11-08 13:50:26 +0000
committerAlan Modra <amodra@gmail.com>2011-11-08 13:50:26 +0000
commitc422a9b405973f2e664c18a4cb2cc0375b2976fa (patch)
tree48f7aab84a271b0872a71ded6bfa63e2d1c84280
parent0b9d49affde4f8aeded68c7593944414271b63e2 (diff)
downloadgdb-c422a9b405973f2e664c18a4cb2cc0375b2976fa.zip
gdb-c422a9b405973f2e664c18a4cb2cc0375b2976fa.tar.gz
gdb-c422a9b405973f2e664c18a4cb2cc0375b2976fa.tar.bz2
* elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark syms in
executables when export_dynamic.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 93f8ff9..c3899c1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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
diff --git a/bfd/elflink.c b/bfd/elflink.c
index dfd9b43..bb82f5b 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -11940,7 +11940,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