aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-09-16 18:08:44 +0930
committerAlan Modra <amodra@gmail.com>2022-09-16 18:55:11 +0930
commit737e29d05eb6bbad8510bdedd5ffc5a5562897fb (patch)
tree186d2c0d98b584c1541bcbfa902447700e96bf1d
parent5c0b4ee406035917d0e50aa138194fab57ae6bf8 (diff)
downloadgdb-737e29d05eb6bbad8510bdedd5ffc5a5562897fb.zip
gdb-737e29d05eb6bbad8510bdedd5ffc5a5562897fb.tar.gz
gdb-737e29d05eb6bbad8510bdedd5ffc5a5562897fb.tar.bz2
PowerPC64 pcrel got relocs against local symbols
Not that anyone would want to indirect via the GOT when an address can be loaded directly with pla, the following: pld 3,x@got@pcrel x: leads to "Internal error in md_apply_fix", because the generic parts of assembler fixup handling convert the fx_pcrel fixup to one without a symbol. Stop that happening. * config/tc-ppc.c (ppc_force_relocation): Add PLT_PCREL34 and assorted GOT_PCREL34 relocs. (cherry picked from commit 49c3ed081fed6b8e2b48fdc48f805f11e4589514)
-rw-r--r--gas/config/tc-ppc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 89bc7d3..2676133 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -6765,6 +6765,12 @@ ppc_force_relocation (fixS *fix)
case BFD_RELOC_PPC_BA16_BRNTAKEN:
case BFD_RELOC_24_PLT_PCREL:
case BFD_RELOC_PPC64_TOC:
+ case BFD_RELOC_PPC64_PLT_PCREL34:
+ case BFD_RELOC_PPC64_GOT_PCREL34:
+ case BFD_RELOC_PPC64_GOT_TLSGD_PCREL34:
+ case BFD_RELOC_PPC64_GOT_TLSLD_PCREL34:
+ case BFD_RELOC_PPC64_GOT_TPREL_PCREL34:
+ case BFD_RELOC_PPC64_GOT_DTPREL_PCREL34:
return 1;
case BFD_RELOC_PPC_B26:
case BFD_RELOC_PPC_BA26: