* 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.
This commit is contained in:
parent
d737fd7f91
commit
be8dd2ca9e
@ -1,6 +1,7 @@
|
|||||||
2004-12-10 Alan Modra <amodra@bigpond.net.au>
|
2004-12-10 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name.
|
* elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
|
||||||
|
add symtab_hdr param.
|
||||||
(group_signature): Update calls.
|
(group_signature): Update calls.
|
||||||
* elf-bfd.h (bfd_elf_sym_name): Update.
|
* elf-bfd.h (bfd_elf_sym_name): Update.
|
||||||
* elf32-ppc.c (ppc_elf_relocate_section): Update.
|
* elf32-ppc.c (ppc_elf_relocate_section): Update.
|
||||||
|
@ -1358,7 +1358,7 @@ extern Elf_Internal_Sym *bfd_elf_get_elf_syms
|
|||||||
(bfd *, Elf_Internal_Shdr *, size_t, size_t, Elf_Internal_Sym *, void *,
|
(bfd *, Elf_Internal_Shdr *, size_t, size_t, Elf_Internal_Sym *, void *,
|
||||||
Elf_External_Sym_Shndx *);
|
Elf_External_Sym_Shndx *);
|
||||||
extern const char *bfd_elf_sym_name
|
extern const char *bfd_elf_sym_name
|
||||||
(bfd *, Elf_Internal_Sym *);
|
(bfd *, Elf_Internal_Shdr *, Elf_Internal_Sym *);
|
||||||
|
|
||||||
extern bfd_boolean _bfd_elf_copy_private_bfd_data
|
extern bfd_boolean _bfd_elf_copy_private_bfd_data
|
||||||
(bfd *, bfd *);
|
(bfd *, bfd *);
|
||||||
|
@ -405,10 +405,12 @@ bfd_elf_get_elf_syms (bfd *ibfd,
|
|||||||
|
|
||||||
/* Look up a symbol name. */
|
/* Look up a symbol name. */
|
||||||
const char *
|
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 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
|
if (iname == 0 && ELF_ST_TYPE (isym->st_info) == STT_SECTION
|
||||||
/* Check for a bogus st_shndx to avoid crashing. */
|
/* Check for a bogus st_shndx to avoid crashing. */
|
||||||
&& isym->st_shndx < elf_numsections (abfd)
|
&& isym->st_shndx < elf_numsections (abfd)
|
||||||
@ -451,7 +453,7 @@ group_signature (bfd *abfd, Elf_Internal_Shdr *ghdr)
|
|||||||
&isym, esym, &eshndx) == NULL)
|
&isym, esym, &eshndx) == NULL)
|
||||||
return 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. */
|
/* Set next_in_group list pointer, and group name for NEWSECT. */
|
||||||
|
@ -4694,7 +4694,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
|
|||||||
{
|
{
|
||||||
sym = local_syms + r_symndx;
|
sym = local_syms + r_symndx;
|
||||||
sec = local_sections[r_symndx];
|
sec = local_sections[r_symndx];
|
||||||
sym_name = bfd_elf_sym_name (input_bfd, sym);
|
sym_name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym);
|
||||||
|
|
||||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||||
}
|
}
|
||||||
|
@ -6006,7 +6006,7 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info,
|
|||||||
if (h != NULL)
|
if (h != NULL)
|
||||||
sym_name = h->root.root.string;
|
sym_name = h->root.root.string;
|
||||||
else
|
else
|
||||||
sym_name = bfd_elf_sym_name (ibfd, sym);
|
sym_name = bfd_elf_sym_name (ibfd, symtab_hdr, sym);
|
||||||
|
|
||||||
(*_bfd_error_handler)
|
(*_bfd_error_handler)
|
||||||
(_("%B: undefined sym `%s' in .opd section"),
|
(_("%B: undefined sym `%s' in .opd section"),
|
||||||
@ -7051,7 +7051,7 @@ ppc64_elf_edit_toc (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
|
|||||||
{
|
{
|
||||||
(*_bfd_error_handler)
|
(*_bfd_error_handler)
|
||||||
(_("%s defined in removed toc entry"),
|
(_("%s defined in removed toc entry"),
|
||||||
bfd_elf_sym_name (ibfd, sym));
|
bfd_elf_sym_name (ibfd, symtab_hdr, sym));
|
||||||
sym->st_value = 0;
|
sym->st_value = 0;
|
||||||
sym->st_shndx = SHN_ABS;
|
sym->st_shndx = SHN_ABS;
|
||||||
}
|
}
|
||||||
@ -9142,7 +9142,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
|
|||||||
|
|
||||||
sym = local_syms + r_symndx;
|
sym = local_syms + r_symndx;
|
||||||
sec = local_sections[r_symndx];
|
sec = local_sections[r_symndx];
|
||||||
sym_name = bfd_elf_sym_name (input_bfd, sym);
|
sym_name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym);
|
||||||
sym_type = ELF64_ST_TYPE (sym->st_info);
|
sym_type = ELF64_ST_TYPE (sym->st_info);
|
||||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||||
opd_adjust = get_opd_info (sec);
|
opd_adjust = get_opd_info (sec);
|
||||||
|
@ -6819,7 +6819,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
|
|||||||
{
|
{
|
||||||
Elf_Internal_Sym *sym = isymbuf + r_symndx;
|
Elf_Internal_Sym *sym = isymbuf + r_symndx;
|
||||||
ps = &finfo->sections[r_symndx];
|
ps = &finfo->sections[r_symndx];
|
||||||
sym_name = bfd_elf_sym_name (input_bfd, sym);
|
sym_name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Complain if the definition comes from a
|
/* Complain if the definition comes from a
|
||||||
|
Loading…
Reference in New Issue
Block a user