]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
microblaze: Check for indirect and warning symbols
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 18 Oct 2017 00:15:02 +0000 (17:15 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 18 Oct 2017 00:15:02 +0000 (17:15 -0700)
Relocations against indirect and warning symbols should be applied to real
symbols.

* elf32-microblaze.c (microblaze_elf_check_relocs): Check for
indirect and warning symbols.

bfd/ChangeLog
bfd/elf32-microblaze.c

index 237381680647c2d927279f16eb277b93e03aec0a..c574a9abc6497a17f42df912241a4db5bb840750 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-17  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
+       indirect and warning symbols.
+
 2017-10-17  Alan Modra  <amodra@gmail.com>
 
        PR 22307
index 1a69b6da72dc2ad8196502558c2fa9aa7bab6085..a54044fdb3c45327ddb4792223bb37a689c8f11b 100644 (file)
@@ -2307,6 +2307,9 @@ microblaze_elf_check_relocs (bfd * abfd,
       else
        {
          h = sym_hashes [r_symndx - symtab_hdr->sh_info];
+         while (h->root.type == bfd_link_hash_indirect
+                || h->root.type == bfd_link_hash_warning)
+           h = (struct elf_link_hash_entry *) h->root.u.i.link;
 
          /* PR15323, ref flags aren't set for references in the same
             object.  */