summaryrefslogtreecommitdiff
path: root/bfd/elf32-s390.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2009-06-18 14:18:29 +0000
committerAlan Modra <amodra@bigpond.net.au>2009-06-18 14:18:29 +0000
commita8010a5951aae4c3531c80ba949ea471f64976b3 (patch)
treecb3c49b6d17cc144defc518dd3d4e4c776f53a10 /bfd/elf32-s390.c
parentef27ea667e4a15cfde9e0ef840ed8dcf2344d99b (diff)
downloadbinutils-redhat-a8010a5951aae4c3531c80ba949ea471f64976b3.tar.gz
* elf-bfd.h (struct sym_sec_cache): Delete.
(struct sym_cache): New. (bfd_section_from_r_symndx): Delete prototype. (bfd_sym_from_r_symndx): Define prototype. * elf.c (bfd_section_from_r_symndx): Delete, replace with.. (bfd_sym_from_r_symndx): ..new function. * elf32-arm.c: Update all uses of struct sym_sec_cache and bfd_section_from_r_symndx to new struct and function. * elf32-bfin.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i386.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68hc1x.h: Likewise. * elf32-m68k.c: Likewise. * elf32-ppc.c: Likewise. * elf32-s390.c: Likewise. * elf32-sh.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-x86-64.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-sparc.h: Likewise.
Diffstat (limited to 'bfd/elf32-s390.c')
-rw-r--r--bfd/elf32-s390.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 531f9e6a85..170b1f9daf 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -730,8 +730,8 @@ struct elf_s390_link_hash_table
bfd_vma offset;
} tls_ldm_got;
- /* Small local sym to section mapping cache. */
- struct sym_sec_cache sym_sec;
+ /* Small local sym cache. */
+ struct sym_cache sym_cache;
};
/* Get the s390 ELF linker hash table from a link_info structure. */
@@ -800,7 +800,7 @@ elf_s390_link_hash_table_create (abfd)
ret->sdynbss = NULL;
ret->srelbss = NULL;
ret->tls_ldm_got.refcount = 0;
- ret->sym_sec.abfd = NULL;
+ ret->sym_cache.abfd = NULL;
return &ret->elf.root;
}
@@ -1294,12 +1294,17 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
easily. Oh well. */
asection *s;
void *vpp;
+ Elf_Internal_Sym *isym;
- s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
- sec, r_symndx);
- if (s == NULL)
+ isym = bfd_sym_from_r_symndx (&htab->sym_cache,
+ abfd, r_symndx);
+ if (isym == NULL)
return FALSE;
+ s = bfd_section_from_elf_index (abfd, isym->st_shndx);
+ if (s == NULL)
+ s = sec;
+
vpp = &elf_section_data (s)->local_dynrel;
head = (struct elf_s390_dyn_relocs **) vpp;
}