[ARC] Reassign the symbol got information to actual symbol when indirect.
authorCupertino Miranda <cmiranda@synopsys.com>
Mon, 24 Oct 2016 20:19:48 +0000 (22:19 +0200)
committerCupertino Miranda <cmiranda@synopsys.com>
Thu, 8 Jun 2017 17:00:34 +0000 (19:00 +0200)
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/ChangeLog
bfd/elf32-arc.c

index ba3691981f72172a2caf83de80d7736fcb030bd7..a436e2e52122fbc66dbb33e771a112aa19056f14 100644 (file)
@@ -1,3 +1,8 @@
+2017-06-08  Cupertino Miranda  <cmiranda@synopsys.com>
+
+       * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
+       symbols.
+
 2017-06-08  Cupertino Miranda  <cmiranda@synopsys.com>
 
        * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
index 8aec9eaee9cd5cdcad71b8721a4ffe3edc17bc7b..26e1bd4c7950dab48953a6faf16f724871707752 100644 (file)
@@ -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)); */
This page took 0.028348 seconds and 4 git commands to generate.