aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arc.c
diff options
context:
space:
mode:
authorCupertino Miranda <cmiranda@synopsys.com>2016-10-24 22:19:48 +0200
committerCupertino Miranda <cmiranda@synopsys.com>2017-06-08 19:00:34 +0200
commitcc89d0b3344614ae97456df84034096b698e5790 (patch)
treec28cf681d11e267fd8ab6e9942661ada8ffb9dba /bfd/elf32-arc.c
parent9d5c718b7a9c46132940f899f40556a77ca462a0 (diff)
downloadgdb-cc89d0b3344614ae97456df84034096b698e5790.zip
gdb-cc89d0b3344614ae97456df84034096b698e5790.tar.gz
gdb-cc89d0b3344614ae97456df84034096b698e5790.tar.bz2
[ARC] Reassign the symbol got information to actual symbol when indirect.
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.
Diffstat (limited to 'bfd/elf32-arc.c')
-rw-r--r--bfd/elf32-arc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index 8aec9ea..26e1bd4 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -1588,7 +1588,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)); */