PR28307, segfault in ppc64_elf_toc64_reloc
authorAlan Modra <amodra@gmail.com>
Mon, 6 Sep 2021 12:53:15 +0000 (22:23 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 7 Sep 2021 01:11:29 +0000 (10:41 +0930)
commitb54509b84488023954f6974229b24fe6c993742b
treeabcbcdba27d2d4f5ddf767ea0c073609af32b01a
parentb4d9dd5c3576a8d6b1a59b11f8af1a3a2abd5fdc
PR28307, segfault in ppc64_elf_toc64_reloc

Adds missing bfd_reloc_offset_in_range checks to various relocation
special_functions.

PR 28307
* elf32-ppc.c (ppc_elf_addr16_ha_reloc): Range check reloc offset.
* elf64-ppc.c (ppc64_elf_ha_reloc, ppc64_elf_brtaken_reloc): Likewise.
(ppc64_elf_toc64_reloc, ppc64_elf_prefix_reloc): Likewise.
bfd/elf32-ppc.c
bfd/elf64-ppc.c