summaryrefslogtreecommitdiff
path: root/bfd/cpu-ns32k.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/cpu-ns32k.c')
-rw-r--r--bfd/cpu-ns32k.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/bfd/cpu-ns32k.c b/bfd/cpu-ns32k.c
index 074eb70a62c..0cd358da967 100644
--- a/bfd/cpu-ns32k.c
+++ b/bfd/cpu-ns32k.c
@@ -170,7 +170,6 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
bfd_vma relocation;
bfd_reloc_status_type flag = bfd_reloc_ok;
bfd_size_type addr = reloc_entry->address;
- bfd_size_type sz;
bfd_vma output_base = 0;
reloc_howto_type *howto = reloc_entry->howto;
asection *reloc_target_output_section;
@@ -192,8 +191,7 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
flag = bfd_reloc_undefined;
/* Is the address of the relocation really within the 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;
/* Work out which section the relocation is targeted at and the
@@ -804,11 +802,9 @@ _bfd_ns32k_final_link_relocate (howto, input_bfd, input_section, contents,
bfd_vma addend;
{
bfd_vma relocation;
- bfd_size_type sz;
/* Sanity check the address. */
- sz = input_section->rawsize ? input_section->rawsize : input_section->size;
- if (address > sz)
+ if (address > bfd_get_section_limit (input_bfd, input_section))
return bfd_reloc_outofrange;
/* This function assumes that we are dealing with a basic relocation