aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2004-12-10 14:04:58 +0000
committerAlan Modra <amodra@gmail.com>2004-12-10 14:04:58 +0000
commitbe8dd2ca9e08391a139097982223cacf07a76697 (patch)
treeeec254d24d22d8408aa8deab09011be97c3bed52 /bfd/elf.c
parentd737fd7f91e8282171e28b96156adbf8362293b8 (diff)
downloadgdb-be8dd2ca9e08391a139097982223cacf07a76697.zip
gdb-be8dd2ca9e08391a139097982223cacf07a76697.tar.gz
gdb-be8dd2ca9e08391a139097982223cacf07a76697.tar.bz2
* elf.c (bfd_elf_sym_name): Add symtab_hdr param.
(group_signature): Update call. * elf-bfd.h (bfd_elf_sym_name): Update. * elf32-ppc.c (ppc_elf_relocate_section): Update. * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc) (ppc64_elf_relocate_section): Update * elflink.c (elf_link_input_bfd): Update.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index a136102..31cd1eb 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -405,10 +405,12 @@ bfd_elf_get_elf_syms (bfd *ibfd,
/* Look up a symbol name. */
const char *
-bfd_elf_sym_name (bfd *abfd, Elf_Internal_Sym *isym)
+bfd_elf_sym_name (bfd *abfd,
+ Elf_Internal_Shdr *symtab_hdr,
+ Elf_Internal_Sym *isym)
{
unsigned int iname = isym->st_name;
- unsigned int shindex = elf_tdata (abfd)->symtab_hdr.sh_link;
+ unsigned int shindex = symtab_hdr->sh_link;
if (iname == 0 && ELF_ST_TYPE (isym->st_info) == STT_SECTION
/* Check for a bogus st_shndx to avoid crashing. */
&& isym->st_shndx < elf_numsections (abfd)
@@ -451,7 +453,7 @@ group_signature (bfd *abfd, Elf_Internal_Shdr *ghdr)
&isym, esym, &eshndx) == NULL)
return NULL;
- return bfd_elf_sym_name (abfd, &isym);
+ return bfd_elf_sym_name (abfd, hdr, &isym);
}
/* Set next_in_group list pointer, and group name for NEWSECT. */