From: H.J. Lu Date: Sat, 14 Oct 2017 18:23:45 +0000 (-0700) Subject: cris: Don't hide symbol which was forced to be dynamic X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=5d84490bf6ac806c15781a833f0e1e7a191f334f;p=deliverable%2Fbinutils-gdb.git 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9a124bd3b4..5f3fb8c14c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2017-10-14 H.J. Lu + + PR ld/21384 + * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't + hide symbol which was forced to be dynamic. + 2017-10-14 H.J. Lu PR ld/22269 diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index 4c80d002cc..387c7c7475 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) {