Fallout from recent bfd_reloc_outofrange changes
[deliverable/binutils-gdb.git] / bfd / elf32-sh.c
index a13a6f6276db37e7199636a6ed457ac6e2728c41..f92cdff3e201d0350f59c6952a4583568ecffaea 100644 (file)
@@ -256,10 +256,8 @@ sh_elf_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol_in,
     return bfd_reloc_undefined;
 
   /* PR 17512: file: 9891ca98.  */
-  if (addr > bfd_get_section_limit (abfd, input_section)
-      - bfd_get_reloc_size (reloc_entry->howto)
-      || bfd_get_reloc_size (reloc_entry->howto)
-      > bfd_get_section_limit (abfd, input_section))
+  if (addr * bfd_octets_per_byte (abfd) + bfd_get_reloc_size (reloc_entry->howto)
+      > bfd_get_section_limit_octets (abfd, input_section))
     return bfd_reloc_outofrange;
 
   if (bfd_is_com_section (symbol_in->section))
This page took 0.023924 seconds and 4 git commands to generate.