X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=bfd%2Felf32-sh.c;h=73b861e18f3e2f180d9a7698472e63ce4e0b6d32;hb=7d41169b6d4dbc3950516d0cdf0d8ca462b52bbb;hp=dae248f50e65ba20d07bc50c9a8b96000a82b442;hpb=0a1b45a20eaa98d4d9026dc1fd17e79e741183af;p=binutils-gdb.git diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index dae248f50e6..73b861e18f3 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -1,5 +1,5 @@ /* Renesas / SuperH SH specific support for 32-bit ELF - Copyright (C) 1996-2021 Free Software Foundation, Inc. + Copyright (C) 1996-2022 Free Software Foundation, Inc. Contributed by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -426,13 +426,12 @@ sh_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) r = ELF32_R_TYPE (dst->r_info); - if (r >= R_SH_max + if (r >= R_SH_FIRST_INVALID_RELOC_6 || (r >= R_SH_FIRST_INVALID_RELOC && r <= R_SH_LAST_INVALID_RELOC) || (r >= R_SH_FIRST_INVALID_RELOC_2 && r <= R_SH_LAST_INVALID_RELOC_2) || (r >= R_SH_FIRST_INVALID_RELOC_3 && r <= R_SH_LAST_INVALID_RELOC_3) || (r >= R_SH_FIRST_INVALID_RELOC_4 && r <= R_SH_LAST_INVALID_RELOC_4) - || (r >= R_SH_FIRST_INVALID_RELOC_5 && r <= R_SH_LAST_INVALID_RELOC_5) - || (r >= R_SH_FIRST_INVALID_RELOC_6 && r <= R_SH_LAST_INVALID_RELOC_6)) + || (r >= R_SH_FIRST_INVALID_RELOC_5 && r <= R_SH_LAST_INVALID_RELOC_5)) { /* xgettext:c-format */ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),