aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-aarch64
diff options
context:
space:
mode:
authorMarcus Shawcroft <marcus.shawcroft@arm.com>2015-02-19 09:10:11 +0000
committerMarcus Shawcroft <marcus.shawcroft@arm.com>2015-02-26 22:23:09 +0000
commitb480a4819bb85f0d8004cc0904e7a2eeb03cb2b7 (patch)
tree2fbea5793433018420c1b60107c59bacc71ad0b6 /ld/testsuite/ld-aarch64
parent3c12b0543695609d96f818b2a60c74b624fc0ffb (diff)
downloadgdb-b480a4819bb85f0d8004cc0904e7a2eeb03cb2b7.zip
gdb-b480a4819bb85f0d8004cc0904e7a2eeb03cb2b7.tar.gz
gdb-b480a4819bb85f0d8004cc0904e7a2eeb03cb2b7.tar.bz2
Add tiny memory model GD test cases.
Diffstat (limited to 'ld/testsuite/ld-aarch64')
-rw-r--r--ld/testsuite/ld-aarch64/aarch64-elf.exp3
-rw-r--r--ld/testsuite/ld-aarch64/tls-tiny-gd-ie.d11
-rw-r--r--ld/testsuite/ld-aarch64/tls-tiny-gd-ie.s14
-rw-r--r--ld/testsuite/ld-aarch64/tls-tiny-gd-le.d11
-rw-r--r--ld/testsuite/ld-aarch64/tls-tiny-gd-le.s12
-rw-r--r--ld/testsuite/ld-aarch64/tls-tiny-gd.d27
-rw-r--r--ld/testsuite/ld-aarch64/tls-tiny-gd.s6
7 files changed, 84 insertions, 0 deletions
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index fed34da..40d9f61 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -124,6 +124,9 @@ run_dump_test "tls-relax-gdesc-ie-2"
run_dump_test "tls-relax-gdesc-le-2"
run_dump_test "tls-relax-ie-le-2"
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-ie"
run_dump_test "tlsle-symbol-offset"
run_dump_test "gc-got-relocs"
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-gd-ie.d b/ld/testsuite/ld-aarch64/tls-tiny-gd-ie.d
new file mode 100644
index 0000000..629d90c
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-tiny-gd-ie.d
@@ -0,0 +1,11 @@
+#source: tls-tiny-gd-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: d53bd041 mrs x1, tpidr_el0
+ +10008: 8b000020 add x0, x1, x0
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-gd-ie.s b/ld/testsuite/ld-aarch64/tls-tiny-gd-ie.s
new file mode 100644
index 0000000..4dc7e66
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-tiny-gd-ie.s
@@ -0,0 +1,14 @@
+ .global var
+
+ .section .tbss,"awT",%nobits
+ .align 2
+ .type var, %object
+ .size var, 4
+var:
+ .zero 4
+
+ .text
+test:
+ adr x0, :tlsgd:var
+ bl __tls_get_addr
+ nop
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-gd-le.d b/ld/testsuite/ld-aarch64/tls-tiny-gd-le.d
new file mode 100644
index 0000000..016ca70
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-tiny-gd-le.d
@@ -0,0 +1,11 @@
+#source: tls-tiny-gd-le.s
+#ld: -T relocs.ld -e0
+#objdump: -dr
+#...
+
+Disassembly of section .text:
+
+0000000000010000 \<test\>:
+ +10000: d53bd041 mrs x1, tpidr_el0
+ +10004: 91400020 add x0, x1, #0x0, lsl #12
+ +10008: 91004000 add x0, x0, #0x10
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-gd-le.s b/ld/testsuite/ld-aarch64/tls-tiny-gd-le.s
new file mode 100644
index 0000000..1cb6da3
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-tiny-gd-le.s
@@ -0,0 +1,12 @@
+ .section .tbss,"awT",%nobits
+ .align 2
+ .type var, %object
+ .size var, 4
+var:
+ .zero 4
+
+ .text
+test:
+ adr x0, :tlsgd:var
+ bl __tls_get_addr
+ nop
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-gd.d b/ld/testsuite/ld-aarch64/tls-tiny-gd.d
new file mode 100644
index 0000000..5e77706
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-tiny-gd.d
@@ -0,0 +1,27 @@
+#source: tls-tiny-gd.s
+#ld: -shared -T relocs.ld -e0
+#objdump: -dr
+#...
+
+Disassembly of section .text:
+
+0000000000010000 \<test\>:
+ +10000: 10080040 adr x0, 20008 \<_GLOBAL_OFFSET_TABLE_\+0x8\>
+ +10004: 9400000a bl 1002c \<test\+0x2c\>
+ +10008: d503201f nop
+
+Disassembly of section .plt:
+
+000000000001000c \<.plt\>:
+ +1000c: a9bf7bf0 stp x16, x30, \[sp,#-16\]!
+ +10010: 90000090 adrp x16, 20000 \<_GLOBAL_OFFSET_TABLE_\>
+ +10014: f9401611 ldr x17, \[x16,#40\]
+ +10018: 9100a210 add x16, x16, #0x28
+ +1001c: d61f0220 br x17
+ +10020: d503201f nop
+ +10024: d503201f nop
+ +10028: d503201f nop
+ +1002c: 90000090 adrp x16, 20000 \<_GLOBAL_OFFSET_TABLE_\>
+ +10030: f9401a11 ldr x17, \[x16,#48\]
+ +10034: 9100c210 add x16, x16, #0x30
+ +10038: d61f0220 br x17
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-gd.s b/ld/testsuite/ld-aarch64/tls-tiny-gd.s
new file mode 100644
index 0000000..fd42f55
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-tiny-gd.s
@@ -0,0 +1,6 @@
+ .global var
+ .text
+test:
+ adr x0, :tlsgd:var
+ bl __tls_get_addr
+ nop