PowerPC use_local_plt
authorAlan Modra <amodra@gmail.com>
Tue, 19 Jan 2021 08:56:11 +0000 (19:26 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 19 Jan 2021 10:48:51 +0000 (21:18 +1030)
commit30845f113a3b01640c46f9b07549b080cb83bc81
tree5d2750c6be95c1f4250e93e44ef87c86e81d571c
parenta75a6a416477915b7d236537c9170ced3064df11
PowerPC use_local_plt

Put the logic to select local vs. usual .plt section in one place.

* elf64-ppc.c (elf_hash_entry): New inline function.  Use
throughout to replace casts.
(branch_reloc_hash_match): Remove const from params.
(use_local_plt): New function.
(allocate_dynrelocs, ppc_build_one_stub, ppc_size_one_stub),
(build_global_entry_stubs_and_plt, ppc64_elf_relocate_section):
Use use_local_plt.
* elf32-ppc.c (use_local_plt): New function.
(allocate_dynrelocs, ppc_elf_relocate_section),
(write_global_sym_plt): Use use_local_plt.
bfd/ChangeLog
bfd/elf32-ppc.c
bfd/elf64-ppc.c