]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
PowerPC64 ld --no-power10-stubs
authorAlan Modra <amodra@gmail.com>
Fri, 10 Jul 2020 01:18:45 +0000 (10:48 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 10 Jul 2020 02:39:58 +0000 (12:09 +0930)
commit8c1ec83fbab79f032950b4aa1d3053ba38544baf
treedb58a81c87c36dd9caee819e307b9357ead2311a
parentb8c0584c4b7fa5aef56e39aa29cf782ac9b59131
PowerPC64 ld --no-power10-stubs

Needed for libraries that use ifuncs or other means to support
cpu-optimized versions of functions, some power10, some not, and those
functions make calls using linkage stubs.

bfd/
* elf64-ppc.h (struct ppc64_elf_params): Add power10_stubs.
* elf64-ppc.c (struct ppc_link_hash_table): Delete
power10_stubs.
(ppc64_elf_check_relocs): Adjust setting of power10_stubs.
(plt_stub_size, ppc_build_one_stub, ppc_size_one_stub): Adjust
uses of power10_stubs.
ld/
* emultempl/ppc64elf.em (params): Init new field.
(enum ppc64_opt): Add OPTION_POWER10_STUBS and OPTION_NO_POWER10_STUBS.
(PARSE_AND_LIST_LONGOPTS): Support --power10-stubs and
--no-power10-stubs.
(PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Likewise.
* testsuite/ld-powerpc/callstub-3.d: New test.
* testsuite/ld-powerpc/powerpc.exp: Run it.

(cherry picked from commit d3b10ee787216d304a858246656ed2fdaecdfd93)
bfd/ChangeLog
bfd/elf64-ppc.c
bfd/elf64-ppc.h
ld/ChangeLog
ld/emultempl/ppc64elf.em
ld/testsuite/ld-powerpc/callstub-3.d [new file with mode: 0644]
ld/testsuite/ld-powerpc/powerpc.exp