aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-05-06 08:43:32 +0930
committerAlan Modra <amodra@gmail.com>2019-05-06 11:41:28 +0930
commit334d91b9407c5f9f37f224b0f43551c01964eff1 (patch)
treecbd9f9290f354419eaef60efd05261073ce323b3 /bfd
parent62e6b7b3b3c6f2fffe9f5863ddebf430533b79f0 (diff)
downloadfsf-binutils-gdb-334d91b9407c5f9f37f224b0f43551c01964eff1.zip
fsf-binutils-gdb-334d91b9407c5f9f37f224b0f43551c01964eff1.tar.gz
fsf-binutils-gdb-334d91b9407c5f9f37f224b0f43551c01964eff1.tar.bz2
PowerPC reloc symbols that shouldn't be adjusted
GOT and PLT relocs shouldn't have their symbols replaced with a section symbol plus added. Nor should the HIGHA TLS relocations, which failed to be caught by the range test in ppc_fix_adjustable. bfd/ * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA), (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA): Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry. gas/ * config/tc-ppc.c (ppc_fix_adjustable): Exclude all GOT and PLT relocs, and VLE sdarel relocs. * testsuite/gas/ppc/power4.d: Adjust.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/bfd-in2.h8
-rw-r--r--bfd/libbfd.h8
-rw-r--r--bfd/reloc.c16
4 files changed, 24 insertions, 16 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6f7f19a..0907098 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2019-05-06 Alan Modra <amodra@gmail.com>
+
+ * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
+ (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
+ Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+
2019-05-04 Alan Modra <amodra@gmail.com>
PR 24511
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 13af0bea..9f60f57 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -3521,20 +3521,20 @@ instruction. */
BFD_RELOC_PPC_GOT_DTPREL16_HA,
BFD_RELOC_PPC64_TPREL16_DS,
BFD_RELOC_PPC64_TPREL16_LO_DS,
+ BFD_RELOC_PPC64_TPREL16_HIGH,
+ BFD_RELOC_PPC64_TPREL16_HIGHA,
BFD_RELOC_PPC64_TPREL16_HIGHER,
BFD_RELOC_PPC64_TPREL16_HIGHERA,
BFD_RELOC_PPC64_TPREL16_HIGHEST,
BFD_RELOC_PPC64_TPREL16_HIGHESTA,
BFD_RELOC_PPC64_DTPREL16_DS,
BFD_RELOC_PPC64_DTPREL16_LO_DS,
+ BFD_RELOC_PPC64_DTPREL16_HIGH,
+ BFD_RELOC_PPC64_DTPREL16_HIGHA,
BFD_RELOC_PPC64_DTPREL16_HIGHER,
BFD_RELOC_PPC64_DTPREL16_HIGHERA,
BFD_RELOC_PPC64_DTPREL16_HIGHEST,
BFD_RELOC_PPC64_DTPREL16_HIGHESTA,
- BFD_RELOC_PPC64_TPREL16_HIGH,
- BFD_RELOC_PPC64_TPREL16_HIGHA,
- BFD_RELOC_PPC64_DTPREL16_HIGH,
- BFD_RELOC_PPC64_DTPREL16_HIGHA,
/* IBM 370/390 relocations */
BFD_RELOC_I370_D12,
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index b51df73..d9b7fb7 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -1508,20 +1508,20 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_PPC_GOT_DTPREL16_HA",
"BFD_RELOC_PPC64_TPREL16_DS",
"BFD_RELOC_PPC64_TPREL16_LO_DS",
+ "BFD_RELOC_PPC64_TPREL16_HIGH",
+ "BFD_RELOC_PPC64_TPREL16_HIGHA",
"BFD_RELOC_PPC64_TPREL16_HIGHER",
"BFD_RELOC_PPC64_TPREL16_HIGHERA",
"BFD_RELOC_PPC64_TPREL16_HIGHEST",
"BFD_RELOC_PPC64_TPREL16_HIGHESTA",
"BFD_RELOC_PPC64_DTPREL16_DS",
"BFD_RELOC_PPC64_DTPREL16_LO_DS",
+ "BFD_RELOC_PPC64_DTPREL16_HIGH",
+ "BFD_RELOC_PPC64_DTPREL16_HIGHA",
"BFD_RELOC_PPC64_DTPREL16_HIGHER",
"BFD_RELOC_PPC64_DTPREL16_HIGHERA",
"BFD_RELOC_PPC64_DTPREL16_HIGHEST",
"BFD_RELOC_PPC64_DTPREL16_HIGHESTA",
- "BFD_RELOC_PPC64_TPREL16_HIGH",
- "BFD_RELOC_PPC64_TPREL16_HIGHA",
- "BFD_RELOC_PPC64_DTPREL16_HIGH",
- "BFD_RELOC_PPC64_DTPREL16_HIGHA",
"BFD_RELOC_I370_D12",
"BFD_RELOC_CTOR",
"BFD_RELOC_ARM_PCREL_BRANCH",
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 9615279..f146581 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -2946,6 +2946,10 @@ ENUMX
ENUMX
BFD_RELOC_PPC64_TPREL16_LO_DS
ENUMX
+ BFD_RELOC_PPC64_TPREL16_HIGH
+ENUMX
+ BFD_RELOC_PPC64_TPREL16_HIGHA
+ENUMX
BFD_RELOC_PPC64_TPREL16_HIGHER
ENUMX
BFD_RELOC_PPC64_TPREL16_HIGHERA
@@ -2958,6 +2962,10 @@ ENUMX
ENUMX
BFD_RELOC_PPC64_DTPREL16_LO_DS
ENUMX
+ BFD_RELOC_PPC64_DTPREL16_HIGH
+ENUMX
+ BFD_RELOC_PPC64_DTPREL16_HIGHA
+ENUMX
BFD_RELOC_PPC64_DTPREL16_HIGHER
ENUMX
BFD_RELOC_PPC64_DTPREL16_HIGHERA
@@ -2965,14 +2973,6 @@ ENUMX
BFD_RELOC_PPC64_DTPREL16_HIGHEST
ENUMX
BFD_RELOC_PPC64_DTPREL16_HIGHESTA
-ENUMX
- BFD_RELOC_PPC64_TPREL16_HIGH
-ENUMX
- BFD_RELOC_PPC64_TPREL16_HIGHA
-ENUMX
- BFD_RELOC_PPC64_DTPREL16_HIGH
-ENUMX
- BFD_RELOC_PPC64_DTPREL16_HIGHA
ENUMDOC
PowerPC and PowerPC64 thread-local storage relocations.