daily update
[deliverable/binutils-gdb.git] / bfd / elfn32-mips.c
index dc93e17b8444e015d24bf29e80fd897bc5e4798d..769c4149812f58de14073ee8bc88b537e1c12511 100644 (file)
@@ -1415,7 +1415,6 @@ gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry,
                 void *data, bfd_vma gp)
 {
   bfd_vma relocation;
-  bfd_size_type sz;
   unsigned long val;
 
   if (bfd_is_com_section (symbol->section))
@@ -1426,8 +1425,7 @@ gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry,
   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;
 
   if (reloc_entry->howto->src_mask == 0)
@@ -1508,7 +1506,6 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
   unsigned short insn = 0;
   bfd_signed_vma val;
   bfd_vma relocation;
-  bfd_size_type sz;
 
   if (output_bfd != NULL)
     relocatable = TRUE;
@@ -1523,8 +1520,7 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
   if (ret != bfd_reloc_ok)
     return ret;
 
-  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;
 
   if (bfd_is_com_section (symbol->section))
This page took 0.024384 seconds and 4 git commands to generate.