cris: Don't hide symbol which was forced to be dynamic
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 14 Oct 2017 18:23:45 +0000 (11:23 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 14 Oct 2017 18:24:29 +0000 (11:24 -0700)
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/ChangeLog
bfd/elf32-cris.c

index 9a124bd3b49a04fdca7b244071d37453856a140b..5f3fb8c14cec7f266eafc379a5d1f41852da4006 100644 (file)
@@ -1,3 +1,9 @@
+2017-10-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       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  <hongjiu.lu@intel.com>
 
        PR ld/22269
index 4c80d002cc8ff775b5e6e59d28b2bcdaf936ef09..387c7c7475b7a76e98b29bac6d640734c014d518 100644 (file)
@@ -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)
        {
This page took 0.029172 seconds and 4 git commands to generate.