aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-sh.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-sh.c')
-rw-r--r--bfd/elf32-sh.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 2e220a5..fb45aeb 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -1843,12 +1843,10 @@ sh_elf_reloc_loop (int r_type ATTRIBUTE_UNUSED, bfd *input_bfd,
bfd_byte *start_ptr, *ptr, *last_ptr;
int diff, cum_diff;
bfd_signed_vma x;
- bfd_size_type sz;
int insn;
/* Sanity check the address. */
- sz = input_section->rawsize ? input_section->rawsize : input_section->size;
- if (addr > sz)
+ if (addr > bfd_get_section_limit (input_bfd, input_section))
return bfd_reloc_outofrange;
/* We require the start and end relocations to be processed consecutively -