aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Shawcroft <marcus.shawcroft@arm.com>2015-02-19 09:52:24 +0000
committerMarcus Shawcroft <marcus.shawcroft@arm.com>2015-02-26 22:59:27 +0000
commit60d1b0d6a43b984b88da499f6bbc13cf729f0447 (patch)
treecd7e4634576b23ecaf88a0191c6288a249d62831
parent1ada945d059789e05542ebf573bd9b7eab2a2654 (diff)
downloadgdb-60d1b0d6a43b984b88da499f6bbc13cf729f0447.zip
gdb-60d1b0d6a43b984b88da499f6bbc13cf729f0447.tar.gz
gdb-60d1b0d6a43b984b88da499f6bbc13cf729f0447.tar.bz2
[AArch64] Add tiny DESC test cases.
-rw-r--r--ld/testsuite/ChangeLog11
-rw-r--r--ld/testsuite/ld-aarch64/aarch64-elf.exp3
-rw-r--r--ld/testsuite/ld-aarch64/tls-tiny-desc-ie.d11
-rw-r--r--ld/testsuite/ld-aarch64/tls-tiny-desc-ie.s15
-rw-r--r--ld/testsuite/ld-aarch64/tls-tiny-desc-le.d11
-rw-r--r--ld/testsuite/ld-aarch64/tls-tiny-desc-le.s13
-rw-r--r--ld/testsuite/ld-aarch64/tls-tiny-desc.d31
-rw-r--r--ld/testsuite/ld-aarch64/tls-tiny-desc.s8
8 files changed, 103 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 651c0f7..196bfa5 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,5 +1,16 @@
2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
+ * ld-aarch64/aarch64-elf.exp (tls-tiny-desc, tls-tiny-desc-ie)
+ (tls-tiny-desc-le): Add.
+ * ld-aarch64/tls-tiny-desc.d: New.
+ * ld-aarch64/tls-tiny-desc.s: New.
+ * ld-aarch64/tls-tiny-desc-ie.d: New.
+ * ld-aarch64/tls-tiny-desc-ie.s: New.
+ * ld-aarch64/tls-tiny-desc-le.d: New.
+ * ld-aarch64/tls-tiny-desc-le.s: New.
+
+2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
* ld-aarch64/aarch64-elf.exp (tls-tiny-gd, tls-tiny-gd-ie)
(tls-tiny-gd-le): Add.
* ld-aarch64/tls-tiny-gd.d: New.
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index 40d9f61..37fc70a 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -127,6 +127,9 @@ run_dump_test "tls-relax-ie-le-3"
run_dump_test "tls-tiny-gd"
run_dump_test "tls-tiny-gd-ie"
run_dump_test "tls-tiny-gd-le"
+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 "tlsle-symbol-offset"
run_dump_test "gc-got-relocs"
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-desc-ie.d b/ld/testsuite/ld-aarch64/tls-tiny-desc-ie.d
new file mode 100644
index 0000000..0088539
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-tiny-desc-ie.d
@@ -0,0 +1,11 @@
+#source: tls-tiny-desc-ie.s
+#ld: -T relocs.ld -e0
+#objdump: -dr
+#...
+
+Disassembly of section .text:
+
+0000000000010000 \<test\>:
+ +10000: 58080040 ldr x0, 20008 \<_GLOBAL_OFFSET_TABLE_\+0x8\>
+ +10004: d503201f nop
+ +10008: d503201f nop
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-desc-ie.s b/ld/testsuite/ld-aarch64/tls-tiny-desc-ie.s
new file mode 100644
index 0000000..520cd4e
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-tiny-desc-ie.s
@@ -0,0 +1,15 @@
+ .global var
+
+ .section .tbss,"awT",%nobits
+ .align 2
+ .type var, %object
+ .size var, 4
+var:
+ .zero 4
+
+ .text
+test:
+ ldr x1, :tlsdesc:var
+ adr x0, :tlsdesc:var
+ .tlsdesccall var
+ blr x1
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-desc-le.d b/ld/testsuite/ld-aarch64/tls-tiny-desc-le.d
new file mode 100644
index 0000000..50eefb0
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-tiny-desc-le.d
@@ -0,0 +1,11 @@
+#source: tls-tiny-desc-le.s
+#ld: -T relocs.ld -e0
+#objdump: -dr
+#...
+
+Disassembly of section .text:
+
+0000000000010000 \<test\>:
+ +10000: d2a00000 movz x0, #0x0, lsl #16
+ +10004: f2800200 movk x0, #0x10
+ +10008: d503201f nop
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-desc-le.s b/ld/testsuite/ld-aarch64/tls-tiny-desc-le.s
new file mode 100644
index 0000000..f6e5854
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-tiny-desc-le.s
@@ -0,0 +1,13 @@
+ .section .tbss,"awT",%nobits
+ .align 2
+ .type var, %object
+ .size var, 4
+var:
+ .zero 4
+
+ .text
+test:
+ ldr x1, :tlsdesc:var
+ adr x0, :tlsdesc:var
+ .tlsdesccall var
+ blr x1
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-desc.d b/ld/testsuite/ld-aarch64/tls-tiny-desc.d
new file mode 100644
index 0000000..fc75eee
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-tiny-desc.d
@@ -0,0 +1,31 @@
+#source: tls-tiny-desc.s
+#ld: -shared -T relocs.ld -e0
+#objdump: -dr
+#...
+
+Disassembly of section .text:
+
+0000000000010000 \<test\>:
+ +10000: 58080141 ldr x1, 20028 \<_GLOBAL_OFFSET_TABLE_\+0x28\>
+ +10004: 10080120 adr x0, 20028 \<_GLOBAL_OFFSET_TABLE_\+0x28\>
+ +10008: d63f0020 blr x1
+
+Disassembly of section .plt:
+
+000000000001000c \<.plt\>:
+ +1000c: a9bf7bf0 stp x16, x30, \[sp,#-16\]!
+ +10010: 90000090 adrp x16, 20000 \<_GLOBAL_OFFSET_TABLE_\>
+ +10014: f9401211 ldr x17, \[x16,#32\]
+ +10018: 91008210 add x16, x16, #0x20
+ +1001c: d61f0220 br x17
+ +10020: d503201f nop
+ +10024: d503201f nop
+ +10028: d503201f nop
+ +1002c: a9bf0fe2 stp x2, x3, \[sp,#-16\]!
+ +10030: 90000082 adrp x2, 20000 \<_GLOBAL_OFFSET_TABLE_\>
+ +10034: 90000083 adrp x3, 20000 \<_GLOBAL_OFFSET_TABLE_\>
+ +10038: f9400442 ldr x2, \[x2,#8\]
+ +1003c: 91004063 add x3, x3, #0x10
+ +10040: d61f0040 br x2
+ +10044: d503201f nop
+ +10048: d503201f nop
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-desc.s b/ld/testsuite/ld-aarch64/tls-tiny-desc.s
new file mode 100644
index 0000000..edf5941
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-tiny-desc.s
@@ -0,0 +1,8 @@
+ .global var
+
+ .text
+test:
+ ldr x1, :tlsdesc:var
+ adr x0, :tlsdesc:var
+ .tlsdesccall var
+ blr x1