* bfd-in.h (bfd_get_section_limit): Define.
[deliverable/binutils-gdb.git] / bfd / elf32-sh.c
index 2e220a5f03d01f2bc8aba27c58d1b2e64694ae4c..fb45aebc55e7074b090af4aac9288bd08253e3d5 100644 (file)
@@ -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 -
This page took 0.035082 seconds and 4 git commands to generate.