aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elflink.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 8f2feae..5ceb5a0 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
+ PR ld/22649
+ * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
+ references on forced local symbols.
+
+2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
+
PR ld/22677
* elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 4c92a04..e3751fa 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -13277,7 +13277,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
+ && ((h->ref_dynamic && !h->forced_local)
|| ((h->def_regular || ELF_COMMON_DEF_P (h))
&& ELF_ST_VISIBILITY (h->other) != STV_INTERNAL
&& ELF_ST_VISIBILITY (h->other) != STV_HIDDEN