From 4972a8e93e2883384ab81158bd85c2d5f3e9ceb8 Mon Sep 17 00:00:00 2001 From: Stephen Clarke Date: Fri, 16 Aug 2002 18:40:54 +0000 Subject: [PATCH] * 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. --- bfd/ChangeLog | 6 ++++++ bfd/elf32-sh.c | 5 +++++ bfd/elf64-sh64.c | 3 +++ 3 files changed, 14 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 903d4c8..ed2278d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2002-08-16 Stephen Clarke + + * 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 * elf32-i370.c: Move reloc enum to include/elf/i370.h. diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 522b816..147483d 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -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: diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c index ba5df98..b57cc08 100644 --- a/bfd/elf64-sh64.c +++ b/bfd/elf64-sh64.c @@ -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: -- 2.7.4