* bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
authorStephen Clarke <stephen.clarke@earthling.net>
Fri, 16 Aug 2002 18:40:54 +0000 (18:40 +0000)
committerStephen Clarke <stephen.clarke@earthling.net>
Fri, 16 Aug 2002 18:40:54 +0000 (18:40 +0000)
symbols when looking for section referred to by a relocation.
* bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.

bfd/ChangeLog
bfd/elf32-sh.c
bfd/elf64-sh64.c

index 903d4c8949246d818ad78e30acb4a44171560e36..ed2278ddb5e8934b7bb01582b9fe1bc340145a68 100644 (file)
@@ -1,3 +1,9 @@
+2002-08-16  Stephen Clarke <stephen.clarke@superh.com>
+
+       * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
+       symbols when looking for section referred to by a relocation.
+       * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
+       
 2002-08-15  Alan Modra  <amodra@bigpond.net.au>
 
        * elf32-i370.c: Move reloc enum to include/elf/i370.h.
index 522b81680f0e4e605144d378046e2b7219e4a336..147483d033bc6b3cddbd9d7a5832270ab1326c90 100644 (file)
@@ -4872,6 +4872,11 @@ sh_elf_gc_mark_hook (sec, info, rel, h, sym)
          break;
 
        default:
+#ifdef INCLUDE_SHMEDIA
+         while (h->root.type == bfd_link_hash_indirect
+                && h->root.u.i.link)
+           h = (struct elf_link_hash_entry *) h->root.u.i.link;
+#endif
          switch (h->root.type)
            {
            case bfd_link_hash_defined:
index ba5df98ce1b130c7d1fdef01fd08822a57b7df2e..b57cc0820bc6d78144576339531969ec762086c3 100644 (file)
@@ -2423,6 +2423,9 @@ sh_elf64_gc_mark_hook (sec, info, rel, h, sym)
          break;
 
        default:
+         while (h->root.type == bfd_link_hash_indirect
+                && h->root.u.i.link)
+           h = (struct elf_link_hash_entry *) h->root.u.i.link;
          switch (h->root.type)
            {
            case bfd_link_hash_defined: