summaryrefslogtreecommitdiff
path: root/bfd/elf32-xtensa.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2005-01-11 09:32:53 +0000
committerAlan Modra <amodra@bigpond.net.au>2005-01-11 09:32:53 +0000
commitcef27e59e3fe874c4afb3481acd94aee850dfdd8 (patch)
treefc0b699f53abf401d70a716d4ed16a33004bcdb8 /bfd/elf32-xtensa.c
parente5542126197fc54a9b8a8543ab4322d4f274d3c3 (diff)
downloadgdb-cef27e59e3fe874c4afb3481acd94aee850dfdd8.tar.gz
* elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
symbols. * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise. * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise. * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise. * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise. * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise. * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise. * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise. * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise. * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise. * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise. * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise. * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise. * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
Diffstat (limited to 'bfd/elf32-xtensa.c')
-rw-r--r--bfd/elf32-xtensa.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index e6015e59f02..b6b3727253e 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -1,5 +1,5 @@
/* Xtensa-specific support for 32-bit ELF.
- Copyright 2003, 2004 Free Software Foundation, Inc.
+ Copyright 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -1039,7 +1039,12 @@ elf_xtensa_gc_sweep_hook (bfd *abfd,
r_symndx = ELF32_R_SYM (rel->r_info);
if (r_symndx >= symtab_hdr->sh_info)
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ {
+ 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;
+ }
r_type = ELF32_R_TYPE (rel->r_info);
switch (r_type)