diff options
Diffstat (limited to 'bfd/coff-m88k.c')
-rw-r--r-- | bfd/coff-m88k.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bfd/coff-m88k.c b/bfd/coff-m88k.c index ebe4fd3..6314bd3 100644 --- a/bfd/coff-m88k.c +++ b/bfd/coff-m88k.c @@ -72,10 +72,17 @@ m88k_special_reloc (bfd *abfd, { bfd_vma output_base = 0; bfd_vma addr = reloc_entry->address; - bfd_vma x = bfd_get_16 (abfd, (bfd_byte *) data + addr); + bfd_vma x; asection *reloc_target_output_section; long relocation = 0; + if (! bfd_reloc_offset_in_range (howto, abfd, input_section, + reloc_entry->address + * bfd_octets_per_byte (abfd))) + return bfd_reloc_outofrange; + + x = bfd_get_16 (abfd, (bfd_byte *) data + addr); + /* Work out which section the relocation is targeted at and the initial relocation command value. */ |