aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-sparc.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-sparc.c')
-rw-r--r--bfd/elf32-sparc.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index f895220..15868eb 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -374,7 +374,6 @@ sparc_elf_wdisp16_reloc (abfd,
{
bfd_vma relocation;
bfd_vma x;
- bfd_size_type sz;
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
@@ -388,8 +387,7 @@ sparc_elf_wdisp16_reloc (abfd,
if (output_bfd != NULL)
return bfd_reloc_continue;
- 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;
relocation = (symbol->value
@@ -432,7 +430,6 @@ sparc_elf_hix22_reloc (abfd,
{
bfd_vma relocation;
bfd_vma insn;
- bfd_size_type sz;
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0)
@@ -444,8 +441,7 @@ sparc_elf_hix22_reloc (abfd,
if (output_bfd != NULL)
return bfd_reloc_continue;
- 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;
relocation = (symbol->value
@@ -480,7 +476,6 @@ sparc_elf_lox10_reloc (abfd,
{
bfd_vma relocation;
bfd_vma insn;
- bfd_size_type sz;
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0)
@@ -492,8 +487,7 @@ sparc_elf_lox10_reloc (abfd,
if (output_bfd != NULL)
return bfd_reloc_continue;
- 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;
relocation = (symbol->value