bfd_vma addend;
{
bfd_signed_vma relocation;
- bfd_size_type sz;
unsigned long x;
bfd_reloc_status_type status;
/* Sanity check the address (offset in section). */
- sz = input_section->rawsize ? input_section->rawsize : input_section->size;
- if (offset > sz)
+ if (offset > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
relocation = symbol_value + addend;
{
bfd_reloc_status_type ret;
bfd_vma relocation;
- bfd_size_type sz;
struct m32r_hi16 *n;
/* This part is from bfd_elf_generic_reloc.
}
/* Sanity check the address (offset in section). */
- sz = input_section->rawsize ? input_section->rawsize : input_section->size;
- if (reloc_entry->address > sz)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
ret = bfd_reloc_ok;
{
bfd_reloc_status_type ret;
bfd_vma relocation;
- bfd_size_type sz;
bfd_byte *inplace_address;
/* This part is from bfd_elf_generic_reloc.
a section relative addend which is wrong. */
/* Sanity check the address (offset in section). */
- sz = input_section->rawsize ? input_section->rawsize : input_section->size;
- if (reloc_entry->address > sz)
+ if (reloc_entry->address > bfd_get_section_limit (input_bfd, input_section))
return bfd_reloc_outofrange;
ret = bfd_reloc_ok;
bfd *dynobj;
bfd_vma *local_got_offsets;
asection *sgot, *splt, *sreloc;
+ bfd_vma high_address = bfd_get_section_limit (input_bfd, input_section);
dynobj = htab->root.dynobj;
local_got_offsets = elf_local_got_offsets (input_bfd);
else
{
bfd_vma relocation;
- bfd_size_type sz;
/* This is a final link. */
sym = NULL;
}
/* Sanity check the address. */
- sz = (input_section->rawsize
- ? input_section->rawsize
- : input_section->size);
- if (offset > input_section->size)
+ if (offset > high_address)
{
r = bfd_reloc_outofrange;
goto check_reloc;