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.
This commit is contained in:
H.J. Lu 2017-10-14 11:23:45 -07:00
parent e01c16a838
commit 5d84490bf6
2 changed files with 7 additions and 0 deletions

View 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

View 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)
{