aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-arm.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/coff-arm.c')
-rw-r--r--bfd/coff-arm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index eb7e038..3f3ab44 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -1202,6 +1202,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
{
struct internal_reloc * rel;
struct internal_reloc * relend;
+ bfd_vma high_address = bfd_get_section_limit (input_bfd, input_section);
rel = relocs;
relend = rel + input_section->reloc_count;
@@ -1635,12 +1636,8 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
code. */
bfd_vma address = rel->r_vaddr - input_section->vma;
- bfd_size_type sz;
- sz = (input_section->rawsize
- ? input_section->rawsize
- : input_section->size);
- if (address > sz)
+ if (address > high_address)
rstat = bfd_reloc_outofrange;
else
{