aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-arm/tls-gdesc-neg.s
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-arm/tls-gdesc-neg.s')
-rw-r--r--ld/testsuite/ld-arm/tls-gdesc-neg.s29
1 files changed, 29 insertions, 0 deletions
diff --git a/ld/testsuite/ld-arm/tls-gdesc-neg.s b/ld/testsuite/ld-arm/tls-gdesc-neg.s
new file mode 100644
index 0000000..78ec32f
--- /dev/null
+++ b/ld/testsuite/ld-arm/tls-gdesc-neg.s
@@ -0,0 +1,29 @@
+ .text
+ .arm
+ .globl foo
+ .type foo, %function
+foo:
+ ldr r0, 1f
+ b 2f
+1:
+ @ Negative addend for R_ARM_TLS_GOTDESC.
+ .word tlsdata(tlsdesc) + (. - 2f + 0)
+2:
+ blx tlsdata(tlscall)
+
+ .thumb
+ .globl bar
+ .type bar, %function
+bar:
+ ldr r0, 1f
+ b 2f
+1:
+ @ Negative addend for R_ARM_TLS_GOTDESC.
+ .word tlsdata(tlsdesc) + (. - 2f + 1)
+2:
+ blx tlsdata(tlscall)
+
+ .section .tdata,"awT"
+ .global tlsdata
+tlsdata:
+ .space 4