[PATCH 3/9] [ARC] Reassign the symbol got information to actual symbol when indirect.

Cupertino Miranda Cupertino.Miranda@synopsys.com
Tue May 23 15:41:00 GMT 2017


GOT information would not be reassign to symbol when it became a indect
symbol.

bfd/ChangeLog:

    Cupertino Miranda  <cmiranda@synopsys.com>

	* elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
	symbols.
---
 bfd/elf32-arc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index fd17128..784bc0a 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -1584,7 +1584,12 @@ elf_arc_relocate_section (bfd *		          output_bfd,
 
 	  while (h->root.type == bfd_link_hash_indirect
 		 || h->root.type == bfd_link_hash_warning)
+	  {
+	    struct elf_link_hash_entry *h_old = h;
 	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+	    if (h->got.glist == 0 && h_old->got.glist != h->got.glist)
+	      h->got.glist = h_old->got.glist;
+	  }
 
 	  /* TODO: Need to validate what was the intention.  */
 	  /* BFD_ASSERT ((h->dynindx == -1) || (h->forced_local != 0)); */
-- 
2.9.0



More information about the Binutils mailing list