summaryrefslogtreecommitdiff
path: root/bfd/coff-mips.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/coff-mips.c')
-rw-r--r--bfd/coff-mips.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c
index c3ade621699..ac2b9345196 100644
--- a/bfd/coff-mips.c
+++ b/bfd/coff-mips.c
@@ -504,6 +504,12 @@ mips_reflo_reloc (bfd *abfd ATTRIBUTE_UNUSED,
unsigned long vallo;
struct mips_hi *next;
+ if (! bfd_reloc_offset_in_range (reloc_entry->howto, abfd,
+ input_section,
+ reloc_entry->address
+ * bfd_octets_per_byte (abfd)))
+ return bfd_reloc_outofrange;
+
/* Do the REFHI relocation. Note that we actually don't
need to know anything about the REFLO itself, except
where to find the low 16 bits of the addend needed by the