aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-07-31 14:34:13 +0000
committerAlan Modra <amodra@gmail.com>2003-07-31 14:34:13 +0000
commit50bc79368a5b9084d4956a75dd9672db56e9b82c (patch)
tree4bec150c7a5821cfd8393294494b619c50f37362 /bfd/elf.c
parentc7773400f66549670c244e1d412d29811773a3ea (diff)
downloadgdb-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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index b03e7ed..f97d507d 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -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);