aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-sh.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-sh.c')
-rw-r--r--bfd/elf32-sh.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index a13a6f6..f92cdff 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -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))