mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
* 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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user