aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-03-04 09:08:49 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2015-03-04 09:09:05 +0000
commite09ab7ac788fd5509adc40b86a3631a3028c1d33 (patch)
treed037ee4c87765b44b3042deb8991032af495e818 /gas
parentbb3d65e427e2cf3a2fbe322443d36336e03545da (diff)
downloadgdb-e09ab7ac788fd5509adc40b86a3631a3028c1d33.zip
gdb-e09ab7ac788fd5509adc40b86a3631a3028c1d33.tar.gz
gdb-e09ab7ac788fd5509adc40b86a3631a3028c1d33.tar.bz2
Allow MOVK for R_AARCH64_TLSLE_MOVW_TPREL_G{0,1}NC
bfd/ PR gas/17843 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC to be used with MOVK rather than MOVZ. gas/ PR gas/17843 * config/tc-aarch64.c (process_movw_reloc_info): Allow R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC for MOVK. gas/testsuite/ PR gas/17843 * gas/aarch64/tls.s, gas/aarch64/tls.d: Add test for R_AARCH64_TLSLE_MOVW_TPREL_G0/R_AARCH64_TLSLE_MOVW_TPREL_G1_NC sequence. ld/testsuite/ PR gas/17843 * ld-aarch64/tlsle.s, ld-aarch64/tlsle.d: New test. * ld-aarch64/aarch64-elf.exp: Run it.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-aarch64.c2
-rw-r--r--gas/testsuite/ChangeLog7
-rw-r--r--gas/testsuite/gas/aarch64/tls.d4
-rw-r--r--gas/testsuite/gas/aarch64/tls.s3
5 files changed, 21 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index d5cc47f..d6d6c95 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2015-03-04 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR gas/17843
+ * config/tc-aarch64.c (process_movw_reloc_info): Allow
+ R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
+ for MOVK.
+
2015-02-28 Alan Modra <amodra@gmail.com>
* write.c (SUB_SEGMENT_ALIGN): Don't pad non-code sections at
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 1e2b182..9179fc6 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -4520,9 +4520,7 @@ process_movw_reloc_info (void)
case BFD_RELOC_AARCH64_MOVW_G1_S:
case BFD_RELOC_AARCH64_MOVW_G2_S:
case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0:
- case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC:
case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1:
- case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC:
case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2:
set_syntax_error
(_("the specified relocation type is not allowed for MOVK"));
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index f19792b..fb6e592 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2015-03-04 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR gas/17843
+ * gas/aarch64/tls.s, gas/aarch64/tls.d: Add test for
+ R_AARCH64_TLSLE_MOVW_TPREL_G0/R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
+ sequence.
+
2015-02-28 Alan Modra <amodra@gmail.com>
* gas/sparc/pcrel.d: Update for changed padding in data sections.
diff --git a/gas/testsuite/gas/aarch64/tls.d b/gas/testsuite/gas/aarch64/tls.d
index 9b79c85..ab67c6a 100644
--- a/gas/testsuite/gas/aarch64/tls.d
+++ b/gas/testsuite/gas/aarch64/tls.d
@@ -31,3 +31,7 @@ Disassembly of section \.text:
2c: R_AARCH64_TLSLE_ADD_TPREL_HI12 var
30: 91000020 add x0, x1, #0x0
30: R_AARCH64_TLSLE_ADD_TPREL_LO12_NC var
+ 34: d2a00000 movz x0, #0x0, lsl #16
+ 34: R_AARCH64_TLSLE_MOVW_TPREL_G1 var
+ 38: f2800000 movk x0, #0x0
+ 38: R_AARCH64_TLSLE_MOVW_TPREL_G0_NC var
diff --git a/gas/testsuite/gas/aarch64/tls.s b/gas/testsuite/gas/aarch64/tls.s
index 3098970..5c85409 100644
--- a/gas/testsuite/gas/aarch64/tls.s
+++ b/gas/testsuite/gas/aarch64/tls.s
@@ -51,3 +51,6 @@ func:
add x0, x1, #:tprel_hi12:var, lsl #12
// R_AARCH64_TLSLE_ADD_TPREL_LO12_NC var
add x0, x1, #:tprel_lo12_nc:var
+
+ movz x0, #:tprel_g1:var
+ movk x0, #:tprel_g0_nc:var