aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
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-large-ie.d19
-rw-r--r--ld/testsuite/ld-aarch64/tls-large-ie.s15
4 files changed, 41 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index e755b8a..e486bba 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2015-10-02 Renlin Li <renlin.li@arm.com>
+ * ld-aarch64/tls-large-ie.d: New.
+ * ld-aarch64/tls-large-ie.s: New.
+ * ld-aarch64/aarch64-elf.exp: Run new test.
+
+2015-10-02 Renlin Li <renlin.li@arm.com>
+
* ld-aarch64/emit-relocs-516.d: New.
* ld-aarch64/emit-relocs-516.s: New.
* ld-aarch64/aarch64-elf.exp: Run new test.
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index 3cafff3..d0da92f 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -197,6 +197,7 @@ run_dump_test "tls-tiny-desc"
run_dump_test "tls-tiny-desc-ie"
run_dump_test "tls-tiny-desc-le"
run_dump_test "tls-tiny-ie"
+run_dump_test "tls-large-ie"
run_dump_test "tls-tiny-ld"
run_dump_test "tls-small-ld"
run_dump_test "tlsle"
diff --git a/ld/testsuite/ld-aarch64/tls-large-ie.d b/ld/testsuite/ld-aarch64/tls-large-ie.d
new file mode 100644
index 0000000..dd0a14d
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-large-ie.d
@@ -0,0 +1,19 @@
+#source: tls-large-ie.s
+#ld: -shared -T relocs.ld -e0
+#objdump: -dr
+#...
+
+Disassembly of section .text:
+
+0000000000010000 \<test\>:
+ 10000: 58000121 ldr x1, 10024 \<test\+0x24\>
+ 10004: 10000102 adr x2, 10024 \<test\+0x24\>
+ 10008: 8b020021 add x1, x1, x2
+ 1000c: d53bd042 mrs x2, tpidr_el0
+ 10010: d2a00000 movz x0, #0x0, lsl #16
+ 10014: f2800100 movk x0, #0x8
+ 10018: f8606820 ldr x0, \[x1,x0\]
+ 1001c: 8b020000 add x0, x0, x2
+ 10020: d503201f nop
+ 10024: 0000ffdc .word 0x0000ffdc
+ 10028: 00000000 .word 0x00000000
diff --git a/ld/testsuite/ld-aarch64/tls-large-ie.s b/ld/testsuite/ld-aarch64/tls-large-ie.s
new file mode 100644
index 0000000..89a2e6b
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-large-ie.s
@@ -0,0 +1,15 @@
+ .global var
+ .text
+test:
+ ldr x1, .Lgot
+ adr x2, .Lgot
+ add x1, x1, x2
+
+ mrs x2, tpidr_el0
+ movz x0, #:gottprel_g1:var
+ movk x0, #:gottprel_g0_nc:var
+ ldr x0, [x1, x0]
+ add x0, x0, x2
+ nop
+
+.Lgot: .xword _GLOBAL_OFFSET_TABLE_ - .