aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorRenlin Li <renlin.li@arm.com>2015-10-02 17:48:31 +0100
committerRenlin Li <renlin.li@arm.com>2015-10-02 17:56:09 +0100
commit3ebe65c0ff9f8f76c9971b1cc078273298f0c693 (patch)
tree3e14846eadaaaee24362f7d6ba2ddde7be57dc2c /ld
parent0484b4549e9e2802e2f9db30a61f4b2a76332a8f (diff)
downloadgdb-3ebe65c0ff9f8f76c9971b1cc078273298f0c693.zip
gdb-3ebe65c0ff9f8f76c9971b1cc078273298f0c693.tar.gz
gdb-3ebe65c0ff9f8f76c9971b1cc078273298f0c693.tar.bz2
[LD][AARCH64]Add TLSIE relaxation support under large memory model.
bfd/ 2015-10-02 Renlin Li <renlin.li@arm.com> * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Add TLSIE_MOVW_GOTTPREL_G1. (aarch64_tls_transition_without_check): Add TLSIE_MOVW_GOTTPREL_G1 to TLSLE_MOVW_TPREL_G2 transition for local symbol. (elfNN_aarch64_tls_relax): Add a argument to pass tp offset. Add TLSIE_MOVW_GOTTPREL_G1 relaxation. (elfNN_aarch64_relocate_section): Call elfNN_aarch64_tls_relax with new argument. ld/testsuite/ 2015-10-02 Renlin Li <renlin.li@arm.com> * ld-aarch64/aarch64-elf.exp (tls-relax-large-le-ie): Run new test. * ld-aarch64/tls-relax-large-ie-le.d: New. * ld-aarch64/tls-relax-large-ie-le.s: New.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog6
-rw-r--r--ld/testsuite/ld-aarch64/aarch64-elf.exp1
-rw-r--r--ld/testsuite/ld-aarch64/tls-relax-large-ie-le.d14
-rw-r--r--ld/testsuite/ld-aarch64/tls-relax-large-ie-le.s19
4 files changed, 40 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 43b688f..b078d3a 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2015-10-02 Renlin Li <renlin.li@arm.com>
+ * ld-aarch64/aarch64-elf.exp (tls-relax-large-le-ie): Run new test.
+ * ld-aarch64/tls-relax-large-ie-le.d: New.
+ * ld-aarch64/tls-relax-large-ie-le.s: New.
+
+2015-10-02 Renlin Li <renlin.li@arm.com>
+
* ld-aarch64/aarch64-elf.exp: Run new test.
* ld-aarch64/tls-large-desc.d: New.
* ld-aarch64/tls-large-desc.s: New.
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index 5c55dc7..5d42710 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -185,6 +185,7 @@ run_dump_test "tls-relax-large-gd-ie"
run_dump_test "tls-relax-large-gd-le"
run_dump_test "tls-relax-large-desc-ie"
run_dump_test "tls-relax-large-desc-le"
+run_dump_test "tls-relax-large-ie-le"
run_dump_test "tls-relax-gdesc-ie"
run_dump_test "tls-relax-ie-le"
run_dump_test "tls-relax-ld-le-small"
diff --git a/ld/testsuite/ld-aarch64/tls-relax-large-ie-le.d b/ld/testsuite/ld-aarch64/tls-relax-large-ie-le.d
new file mode 100644
index 0000000..6bf211b
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-relax-large-ie-le.d
@@ -0,0 +1,14 @@
+#source: tls-relax-large-ie-le.s
+#ld: -T relocs.ld -e0
+#objdump: -dr
+#...
+0000000000010000 <test>:
+ +10000: d53bd041 mrs x1, tpidr_el0
+ +10004: d2c00006 movz x6, #0x0, lsl #32
+ +10008: f2a00006 movk x6, #0x0, lsl #16
+ +1000c: f2800206 movk x6, #0x10
+ +10010: 8b0100c6 add x6, x6, x1
+ +10014: d2c00007 movz x7, #0x0, lsl #32
+ +10018: f2a00007 movk x7, #0x0, lsl #16
+ +1001c: f2800287 movk x7, #0x14
+ +10020: 8b0100e7 add x7, x7, x1
diff --git a/ld/testsuite/ld-aarch64/tls-relax-large-ie-le.s b/ld/testsuite/ld-aarch64/tls-relax-large-ie-le.s
new file mode 100644
index 0000000..c5c12a1
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-relax-large-ie-le.s
@@ -0,0 +1,19 @@
+ .section .tdata,"awT"
+x:
+ .word 2
+y:
+ .word 4
+
+ .text
+test:
+ mrs x1, tpidr_el0
+
+ movz x6, #:gottprel_g1:x
+ movk x6, #:gottprel_g0_nc:x
+ ldr x6, [x2, x6]
+ add x6, x6, x1
+
+ movz x7, #:gottprel_g1:y
+ movk x7, #:gottprel_g0_nc:y
+ ldr x7, [x2, x7]
+ add x7, x7, x1