aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
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);