aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-sh/tlsbin.s
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@rr.iij4u.or.jp>2002-10-11 14:44:55 +0000
committerKaz Kojima <kkojima@rr.iij4u.or.jp>2002-10-11 14:44:55 +0000
commit6c381eeb71e6f61062fb64795097e144d48fa798 (patch)
tree12b7b3e030baa928d152f3d6a3fa9eed99edb1a8 /ld/testsuite/ld-sh/tlsbin.s
parent94a03f18b830422643115cfdae48aed9cdc5c485 (diff)
downloadgdb-6c381eeb71e6f61062fb64795097e144d48fa798.zip
gdb-6c381eeb71e6f61062fb64795097e144d48fa798.tar.gz
gdb-6c381eeb71e6f61062fb64795097e144d48fa798.tar.bz2
* ld-sh/rd-sh.exp: If the test matches *-dso.d, copy the output
of linker to the file tmpdir/*-dso.so. * ld-sh/tlsbin.s, ld-sh/tlsbinpic.s, ld-sh/tlslib.s: New. * ld-sh/tlsbin-0-dso.d: New. * ld-sh/tlsbin-1.d: New. * ld-sh/tlsbin-2.d: New. * ld-sh/tlsbin-3.d: New. * ld-sh/tlsbin-4.d: New. * ld-sh/tlspic1.s, ld-sh/tlspic2.s: New. * ld-sh/tlspic-1.d: New. * ld-sh/tlspic-2.d: New. * ld-sh/tlspic-3.d: New. * ld-sh/tlspic-4.d: New.
Diffstat (limited to 'ld/testsuite/ld-sh/tlsbin.s')
-rw-r--r--ld/testsuite/ld-sh/tlsbin.s90
1 files changed, 90 insertions, 0 deletions
diff --git a/ld/testsuite/ld-sh/tlsbin.s b/ld/testsuite/ld-sh/tlsbin.s
new file mode 100644
index 0000000..642eb3d
--- /dev/null
+++ b/ld/testsuite/ld-sh/tlsbin.s
@@ -0,0 +1,90 @@
+ .section ".tbss", "awT", @nobits
+ .globl bg1, bg2
+bg1: .space 4
+bg2: .space 4
+bl1: .space 4
+bl2: .space 4
+ .text
+ .globl _start
+ .type _start,@function
+_start:
+ mov.l r12,@-r15
+ mov.l r14,@-r15
+ mov r15,r14
+ ! Set up .GOT pointer for non-pic @gottpoff sequences
+ mova .L3,r0
+ mov.l .L3,r12
+ add r0,r12
+ nop;nop;nop;nop
+
+ ! @GOTTPOFF IE against global var
+ mov.l 1f,r0
+ stc gbr,r1
+ mov.l @(r0,r12),r0
+ bra 2f
+ add r0,r1
+ .align 2
+1: .long sG3@GOTTPOFF
+2:
+ nop;nop;nop;nop
+
+ ! @GOTTPOFF IE -> LE against global var defined in exec
+ mov.l 1f,r0
+ stc gbr,r1
+ mov.l @(r0,r12),r0
+ bra 2f
+ add r0,r1
+ .align 2
+1: .long bg1@GOTTPOFF
+2:
+ nop;nop;nop;nop
+
+ ! @GOTTPOFF IE -> LE against local var
+ mov.l 1f,r0
+ stc gbr,r1
+ mov.l @(r0,r12),r0
+ bra 2f
+ add r0,r1
+ .align 2
+1: .long bl2@GOTTPOFF
+2:
+ nop;nop;nop;nop
+
+ ! @GOTTPOFF IE -> LE against hidden but not local var
+ mov.l 1f,r0
+ stc gbr,r1
+ mov.l @(r0,r12),r0
+ bra 2f
+ add r0,r1
+ .align 2
+1: .long sh2@GOTTPOFF
+2:
+ nop;nop;nop;nop
+
+ ! LE @TPOFF, global var defined in exec
+ stc gbr,r1
+ mov.l .L4,r0
+ add r1,r0
+ nop;nop;nop;nop
+
+ ! LE @TPOFF, local var
+ stc gbr,r1
+ mov.l .L5,r0
+ add r1,r0
+ nop;nop;nop;nop
+
+ ! LE @TPOFF, hidden var defined in exec
+ stc gbr,r1
+ mov.l .L6,r0
+ add r1,r0
+ nop;nop;nop;nop
+
+ mov r14,r15
+ rts
+ mov.l @r15+,r14
+
+ .align 2
+.L3: .long _GLOBAL_OFFSET_TABLE_
+.L4: .long sg1@TPOFF
+.L5: .long bl1@TPOFF
+.L6: .long sh1@TPOFF