This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] cris: Don't hide symbol which was forced to be dynamic
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: binutils at sourceware dot org
- Cc: Hans-Peter Nilsson <hp at bitrange dot com>
- Date: Thu, 12 Oct 2017 17:44:59 -0700
- Subject: [PATCH] cris: Don't hide symbol which was forced to be dynamic
- Authentication-results: sourceware.org; auth=none
h->root.dynamic is set on symbols which were forced to be dynamic due
to a version script file. Don't remove such symbols from dynamic symbol
table. This fixes:
FAIL: ld-elf/pr21384
PR ld/21384
* elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
hide symbol which was forced to be dynamic.
---
bfd/elf32-cris.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index a4dc86fc9c..4a91a09bc3 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -3982,6 +3982,7 @@ elf_cris_discard_excess_program_dynamics (struct elf_cris_link_hash_entry *h,
if (! (info->export_dynamic
|| (h->root.type != STT_FUNC && info->dynamic_data))
&& h->root.dynindx != -1
+ && !h->root.dynamic
&& !h->root.def_dynamic
&& !h->root.ref_dynamic)
{
--
2.13.6