{
bfd_vma relocation;
bfd_signed_vma val;
- bfd_size_type sz;
bfd_reloc_status_type status;
if (bfd_is_com_section (symbol->section))
relocation += symbol->section->output_section->vma;
relocation += symbol->section->output_offset;
- 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;
/* Set val to the offset into the section or symbol. */
char **error_message ATTRIBUTE_UNUSED)
{
struct mips_hi16 *n;
- bfd_size_type sz;
- 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;
n = bfd_malloc (sizeof *n);
bfd *output_bfd, char **error_message)
{
bfd_vma vallo;
- bfd_size_type sz;
- 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;
vallo = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
char **error_message ATTRIBUTE_UNUSED)
{
bfd_signed_vma val;
- bfd_size_type sz;
bfd_reloc_status_type status;
bfd_boolean relocatable;
relocatable = (output_bfd != NULL);
- 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;
/* Build up the field adjustment in VAL. */