From 4c60deff5471abd8ba1ff6c88cbbaaab9ffca422 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 20 Jun 2005 13:06:27 +0000 Subject: [PATCH] 2005-06-20 H.J. Lu PR 1022 * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect symbol. --- bfd/ChangeLog | 8 +++++++- bfd/elf32-hppa.c | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0f4a949122..2b6ddabcdb 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,6 +1,12 @@ 2005-06-20 H.J. Lu - PR 1025: + PR 1022 + * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect + symbol. + +2005-06-20 H.J. Lu + + PR 1025 * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol. * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise. diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 12f1b04adc..cdae72a7f4 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -1085,8 +1085,13 @@ elf32_hppa_check_relocs (bfd *abfd, if (r_symndx < symtab_hdr->sh_info) h = NULL; else - h = ((struct elf32_hppa_link_hash_entry *) + { + h = ((struct elf32_hppa_link_hash_entry *) sym_hashes[r_symndx - symtab_hdr->sh_info]); + while (h->elf.root.type == bfd_link_hash_indirect + || h->elf.root.type == bfd_link_hash_warning) + h = (struct elf32_hppa_link_hash_entry *) h->elf.root.u.i.link; + } r_type = ELF32_R_TYPE (rel->r_info); -- 2.11.0