This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] 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.
---
 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]