summaryrefslogtreecommitdiff
path: root/bfd/sunos.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-11-01 18:09:06 +0000
committerIan Lance Taylor <ian@airs.com>1995-11-01 18:09:06 +0000
commitbaabeb74a72eae51dcb5994497bc233584f42353 (patch)
tree4bf4c3745a8c4a6e7c24a6b6f22363a46ce571c5 /bfd/sunos.c
parentef51e36abc679f054f4e591061c7499a78170855 (diff)
downloadbinutils-gdb-baabeb74a72eae51dcb5994497bc233584f42353.tar.gz
* sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
table index against the number of symbols for a base relative reloc.
Diffstat (limited to 'bfd/sunos.c')
-rw-r--r--bfd/sunos.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/bfd/sunos.c b/bfd/sunos.c
index 4b4847bd3f2..a180f2f2034 100644
--- a/bfd/sunos.c
+++ b/bfd/sunos.c
@@ -1710,15 +1710,6 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
continue;
}
}
- else
- {
- if (r_index >= bfd_get_symcount (abfd))
- {
- /* This is abnormal, but should be caught in the
- relocation phase. */
- continue;
- }
- }
/* If this is a base relative reloc, we need to make an entry in
the .got section. */
@@ -1746,6 +1737,13 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
}
else
{
+ if (r_index >= bfd_get_symcount (abfd))
+ {
+ /* This is abnormal, but should be caught in the
+ relocation phase. */
+ continue;
+ }
+
if (adata (abfd).local_got_offsets == NULL)
{
adata (abfd).local_got_offsets =