summaryrefslogtreecommitdiffstats
path: root/bfd/elf32-ppc.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2005-06-20 18:12:11 +0000
committerH.J. Lu <hjl.tools@gmail.com>2005-06-20 18:12:11 +0000
commit973a3492d553c8b18c8a3257b4874253c0efa68a (patch)
treee478aeb74b58cbf253c237c4d50df2785e8ede64 /bfd/elf32-ppc.c
parentf7c5057a527bc1603f36dee7132765c9ecae3d52 (diff)
downloadppe42-binutils-973a3492d553c8b18c8a3257b4874253c0efa68a.tar.gz
ppe42-binutils-973a3492d553c8b18c8a3257b4874253c0efa68a.zip
2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
PR 1025 * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect symbol. * elf32-arm.c (elf32_arm_check_relocs): Likewise. * elf32-avr.c (elf32_avr_check_relocs): Likewise. * elf32-cris.c (cris_elf_check_relocs): Likewise. * elf32-d10v.c (elf32_d10v_check_relocs): Likewise. * elf32-dlx.c (elf32_dlx_check_relocs): Likewise. * elf32-fr30.c (fr30_elf_check_relocs): Likewise. * elf32-frv.c (elf32_frv_check_relocs): Likewise. * elf32-i370.c (i370_elf_check_relocs): Likewise. * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise. * elf32-m32r.c (m32r_elf_check_relocs): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_check_relocs): Likewise. * elf32-mcore.c (mcore_elf_check_relocs): Likewise. * elf32-ms1.c (ms1_elf_check_relocs): Likewise. * elf32-msp430.c (elf32_msp430_check_relocs): Likewise. * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise. * elf32-ppc.c (ppc_elf_check_relocs): Likewise. * elf32-s390.c (elf_s390_check_relocs): Likewise. * elf32-sh.c (sh_elf_check_relocs): Likewise. * elf32-v850.c (v850_elf_check_relocs): Likewise. * elf32-vax.c (elf_vax_check_relocs): Likewise. * elf64-mmix.c (mmix_elf_check_relocs): Likewise. * elf64-ppc.c (ppc64_elf_check_relocs): Likewise. * elf64-s390.c (elf_s390_check_relocs): Likewise. * elf64-sh64.c (sh_elf64_check_relocs): Likewise. * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r--bfd/elf32-ppc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index c9119239c6..1d86b48306 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -2909,7 +2909,12 @@ ppc_elf_check_relocs (bfd *abfd,
if (r_symndx < symtab_hdr->sh_info)
h = NULL;
else
- 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;
+ }
/* If a relocation refers to _GLOBAL_OFFSET_TABLE_, create the .got.
This shows up in particular in an R_PPC_ADDR32 in the eabi
OpenPOWER on IntegriCloud