]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
PowerPC64 --no-pcrel-optimize
authorAlan Modra <amodra@gmail.com>
Wed, 12 Aug 2020 14:01:28 +0000 (23:31 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 24 Sep 2020 02:44:43 +0000 (12:14 +0930)
commitc39dc246d44f9bc6e29bb4b2a0d692d27a0e913a
tree0cd277b5bee35da7ebabeb25033049c0f029cc1c
parent9030004379d4db633dc84a09f3b45ae0d6caed77
PowerPC64 --no-pcrel-optimize

This new option effectively ignores R_PPC64_PCREL_OPT, disabling the
optimization of instructions marked by that relocation.  The patch
also disables GOT indirect to GOT/TOC pointer relative code editing
when --no-toc-optimize.

bfd/
* elf64-ppc.h (struct ppc64_elf_params): Add no_pcrel_opt.
* elf64-ppc.c (ppc64_elf_relocate_section): Disable GOT reloc
optimizations when --no-toc-optimize.  Disable R_PPC64_PCREL_OPT
optimization when --no-pcrel-optimize.
ld/
* emultempl/ppc64elf.em (params): Init new field.
(enum ppc64_opt): Add OPTION_NO_PCREL_OPT.
(PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS),
(PARSE_AND_LIST_ARGS_CASES): Support --no-pcrel-optimize.

(cherry picked from commit 6738c8a7c93cd77a0caa720c6cc21c422561be2c)
bfd/ChangeLog
bfd/elf64-ppc.c
bfd/elf64-ppc.h
ld/ChangeLog
ld/emultempl/ppc64elf.em