This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 3/9] [ARC] Reassign the symbol got information to actual symbol when indirect.
- From: Cupertino Miranda <Cupertino dot Miranda at synopsys dot com>
- To: binutils at sourceware dot org
- Cc: Cupertino dot Miranda at synopsys dot com, Claudiu dot Zissulescu at synopsys dot com, Francois dot Bedard at synopsys dot com
- Date: Tue, 23 May 2017 17:40:50 +0200
- Subject: [PATCH 3/9] [ARC] Reassign the symbol got information to actual symbol when indirect.
- Authentication-results: sourceware.org; auth=none
- References: <20170523154056.19234-1-cmiranda@synopsys.com>
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