aboutsummaryrefslogtreecommitdiff
path: root/bfd/pdp11.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/pdp11.c')
-rw-r--r--bfd/pdp11.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index 2c9fe0a..6429b43 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -1862,7 +1862,8 @@ pdp11_aout_swap_reloc_out (bfd *abfd, arelent *g, bfd_byte *natptr)
if (r_extern) \
{ \
/* Undefined symbol. */ \
- cache_ptr->sym_ptr_ptr = symbols + r_index; \
+ if (r_index < bfd_get_symcount (abfd)) \
+ cache_ptr->sym_ptr_ptr = symbols + r_index; \
cache_ptr->addend = ad; \
} \
else \