* elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.

* elf64-ppc.c (get_fdh): New function, split out from
	ppc64_elf_edit_opd.
	(ppc64_elf_check_relocs): Use get_fdh.
	(func_desc_adjust): Likewise.  Tidy.
	(ppc64_elf_edit_opd): Tighten reloc checks.  Free local_syms on error
	exit.  Use get_fdh.  Account for superfluous dynamic relocs.
	(ppc64_elf_relocate_section): Warning fix.
This commit is contained in:
Alan Modra
2003-07-31 14:34:13 +00:00
parent c7773400f6
commit 50bc79368a
3 changed files with 200 additions and 182 deletions

View File

@@ -1995,7 +1995,8 @@ bfd_section_from_r_symndx (bfd *abfd,
}
cache->indx[ent] = r_symndx;
cache->sec[ent] = sec;
if (isym.st_shndx < SHN_LORESERVE || isym.st_shndx > SHN_HIRESERVE)
if ((isym.st_shndx != SHN_UNDEF && isym.st_shndx < SHN_LORESERVE)
|| isym.st_shndx > SHN_HIRESERVE)
{
asection *s;
s = bfd_section_from_elf_index (abfd, isym.st_shndx);