diff options
author | Alan Modra <amodra@gmail.com> | 2003-07-31 14:34:13 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2003-07-31 14:34:13 +0000 |
commit | 50bc79368a5b9084d4956a75dd9672db56e9b82c (patch) | |
tree | 4bec150c7a5821cfd8393294494b619c50f37362 /bfd/elf.c | |
parent | c7773400f66549670c244e1d412d29811773a3ea (diff) | |
download | gdb-50bc79368a5b9084d4956a75dd9672db56e9b82c.zip gdb-50bc79368a5b9084d4956a75dd9672db56e9b82c.tar.gz gdb-50bc79368a5b9084d4956a75dd9672db56e9b82c.tar.bz2 |
* 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.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |