From 87c69f9732039d889f04ae8b9bb81b80e530a6f1 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sat, 6 Jun 2020 11:56:20 +0930 Subject: Rename PowerPC64 pcrel GOT TLS relocations These relocations should have had REL in their names, to reflect the fact that they are pc-relative. Fix that now by adding _PCREL. I've added some back-compatibility code to support anyone using .reloc with the old relocations. include/ * elf/ppc64.h (elf_ppc64_reloc_type): Rename R_PPC64_GOT_TLSGD34 to R_PPC64_GOT_TLSGD_PCREL34, R_PPC64_GOT_TLSLD34 to R_PPC64_GOT_TLSLD_PCREL34, R_PPC64_GOT_TPREL34 to R_PPC64_GOT_TPREL_PCREL34, and R_PPC64_GOT_DTPREL34 to R_PPC64_GOT_DTPREL_PCREL34. bfd/ * reloc.c: Rename BFD_RELOC_PPC64_GOT_TLSGD34 to BFD_RELOC_PPC64_GOT_TLSGD_PCREL34, BFD_RELOC_PPC64_GOT_TLSLD34 to BFD_RELOC_PPC64_GOT_TLSLD_PCREL34, BFD_RELOC_PPC64_GOT_TPREL34 to BFD_RELOC_PPC64_GOT_TPREL_PCREL34, BFD_RELOC_PPC64_GOT_DTPREL34 to BFD_RELOC_PPC64_GOT_DTPREL_PCREL34. * elf64-ppc.c: Update throughout for reloc renaming. (ppc64_elf_reloc_name_lookup): Handle old reloc names. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. gas/ * config/tc-ppc.c: Update throughout for reloc renaming. elfcpp/ * powerpc.h: Rename R_PPC64_GOT_TLSGD34 to R_PPC64_GOT_TLSGD_PCREL34, R_PPC64_GOT_TLSLD34 to R_PPC64_GOT_TLSLD_PCREL34, R_PPC64_GOT_TPREL34 to R_PPC64_GOT_TPREL_PCREL34, and R_PPC64_GOT_DTPREL34 to R_PPC64_GOT_DTPREL_PCREL34. gold/ * powerpc.cc: Update throughout for reloc renaming. --- include/ChangeLog | 8 ++++++++ include/elf/ppc64.h | 10 +++++----- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/ChangeLog b/include/ChangeLog index e0bef67..f6200db 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,11 @@ +2020-06-06 Alan Modra + + * elf/ppc64.h (elf_ppc64_reloc_type): Rename + R_PPC64_GOT_TLSGD34 to R_PPC64_GOT_TLSGD_PCREL34, + R_PPC64_GOT_TLSLD34 to R_PPC64_GOT_TLSLD_PCREL34, + R_PPC64_GOT_TPREL34 to R_PPC64_GOT_TPREL_PCREL34, and + R_PPC64_GOT_DTPREL34 to R_PPC64_GOT_DTPREL_PCREL34. + 2020-06-04 Jose E. Marchesi * opcode/cgen.h: Get an `endian' argument in both diff --git a/include/elf/ppc64.h b/include/elf/ppc64.h index 22991c8..f7034ec 100644 --- a/include/elf/ppc64.h +++ b/include/elf/ppc64.h @@ -183,10 +183,10 @@ START_RELOC_NUMBERS (elf_ppc64_reloc_type) RELOC_NUMBER (R_PPC64_PCREL28, 145) RELOC_NUMBER (R_PPC64_TPREL34, 146) RELOC_NUMBER (R_PPC64_DTPREL34, 147) - RELOC_NUMBER (R_PPC64_GOT_TLSGD34, 148) - RELOC_NUMBER (R_PPC64_GOT_TLSLD34, 149) - RELOC_NUMBER (R_PPC64_GOT_TPREL34, 150) - RELOC_NUMBER (R_PPC64_GOT_DTPREL34, 151) + RELOC_NUMBER (R_PPC64_GOT_TLSGD_PCREL34, 148) + RELOC_NUMBER (R_PPC64_GOT_TLSLD_PCREL34, 149) + RELOC_NUMBER (R_PPC64_GOT_TPREL_PCREL34, 150) + RELOC_NUMBER (R_PPC64_GOT_DTPREL_PCREL34, 151) #ifndef RELOC_MACROS_GEN_FUNC /* Relocation only used internally by gas or ld. If you need to use @@ -225,7 +225,7 @@ END_RELOC_NUMBERS (R_PPC64_max) #define IS_PPC64_TLS_RELOC(R) \ (((R) >= R_PPC64_TLS && (R) <= R_PPC64_DTPREL16_HIGHESTA) \ || ((R) >= R_PPC64_TPREL16_HIGH && (R) <= R_PPC64_DTPREL16_HIGHA) \ - || ((R) >= R_PPC64_TPREL34 && (R) <= R_PPC64_GOT_DTPREL34)) + || ((R) >= R_PPC64_TPREL34 && (R) <= R_PPC64_GOT_DTPREL_PCREL34)) /* e_flags bits specifying ABI. 1 for original function descriptor using ABI, -- cgit v1.1