aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-cris.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-14 11:23:45 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-14 11:24:29 -0700
commit5d84490bf6ac806c15781a833f0e1e7a191f334f (patch)
tree6390dbb4e4ad70614d8729b1c82ffa1f2a21393f /bfd/elf32-cris.c
parente01c16a83893b03433c8edf4ccae536d9b9f4831 (diff)
downloadgdb-5d84490bf6ac806c15781a833f0e1e7a191f334f.zip
gdb-5d84490bf6ac806c15781a833f0e1e7a191f334f.tar.gz
gdb-5d84490bf6ac806c15781a833f0e1e7a191f334f.tar.bz2
cris: Don't hide symbol which was forced to be dynamic
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.
Diffstat (limited to 'bfd/elf32-cris.c')
-rw-r--r--bfd/elf32-cris.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 4c80d00..387c7c7 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -3988,6 +3988,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)
{