aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-08-12 23:31:28 +0930
committerAlan Modra <amodra@gmail.com>2020-08-13 08:10:18 +0930
commit6738c8a7c93cd77a0caa720c6cc21c422561be2c (patch)
treefbb7e126a4d5a43d2292ecd1faafb1a781d08dde /bfd/elf64-ppc.h
parent75e100a30d5dfdd3ac2b0391c17173645fc77633 (diff)
downloadgdb-6738c8a7c93cd77a0caa720c6cc21c422561be2c.zip
gdb-6738c8a7c93cd77a0caa720c6cc21c422561be2c.tar.gz
gdb-6738c8a7c93cd77a0caa720c6cc21c422561be2c.tar.bz2
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.
Diffstat (limited to 'bfd/elf64-ppc.h')
-rw-r--r--bfd/elf64-ppc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/bfd/elf64-ppc.h b/bfd/elf64-ppc.h
index 547971f..a7230de 100644
--- a/bfd/elf64-ppc.h
+++ b/bfd/elf64-ppc.h
@@ -57,6 +57,9 @@ struct ppc64_elf_params
/* Whether to use power10 instructions in linkage stubs. */
int power10_stubs;
+ /* Whether R_PPC64_PCREL_OPT should be ignored. */
+ int no_pcrel_opt;
+
/* Whether to canonicalize .opd so that there are no overlapping
.opd entries. */
int non_overlapping_opd;