ld: Update function prototypes for compilers defaulting to -std=gnu23
[binutils-gdb.git] / ld / testsuite / ld-loongarch-elf / tlsdesc-dso.s
blobfaadca614c95ec738bfc18e8e21f291a4798b3c0
1 .data
2 .section .tdata,"awT",@progbits
3 .global gl1, gl2, gl3, gl4
4 .global hd1, hd2
5 .hidden hd1, hd2
6 gl1: .dword 1
7 gl2: .dword 2
8 gl3: .dword 3
9 gl4: .dword 4
10 lo1: .dword 10
11 lo2: .dword 20
12 lo3: .dword 30
13 lo4: .dword 40
14 hd1: .dword 100
15 hd2: .dword 200
16 .text
17 # Access global symbol
18 fun_gl1:
19 # GD + IE
20 # GD: pcaddi + addi.d => pcaddi
21 la.tls.gd $a0, gl1
22 la.tls.ie $a0, gl1
24 # GD + DESC
25 # GD: pcaddi + addi.d => pcaddi
26 la.tls.gd $a0, gl2
27 # DESC: pcaddi + addi.d => pcaddi
28 la.tls.desc $a0, gl2
30 # DESC + IE
31 # DESC -> IE
32 la.tls.desc $a0, gl3
33 la.tls.ie $a0, gl3
35 # GD + DESC + IE
36 # GD: pcaddi + addi.d => pcaddi
37 la.tls.gd $a0, gl4
38 # DESC: pcaddi + addi.d => pcaddi
39 la.tls.desc $a0, gl4
40 la.tls.ie $a0, gl4
42 # Access local symbol
43 fun_lo:
44 # IE + GD
45 la.tls.ie $a0, lo1
46 # GD: pcaddi + addi.d => pcaddi
47 la.tls.gd $a0, lo1
49 # DESC + GD
50 # DESC: pcaddi + addi.d => pcaddi
51 la.tls.desc $a0, lo2
52 # GD: pcaddi + addi.d => pcaddi
53 la.tls.gd $a0, lo2
55 # DESC + IE
56 # DESC: DESC -> IE
57 la.tls.desc $a0, lo3
58 la.tls.ie $a0, lo3
60 # DESC + GD + IE
61 # DESC: pcaddi + addi.d => pcaddi
62 la.tls.desc $a0, lo4
63 # GD: pcaddi + addi.d => pcaddi
64 la.tls.gd $a0, lo4
65 la.tls.ie $a0, lo4
67 # Access external undef symbol
68 fun_external:
69 la.tls.desc $a0, sH1
71 # Access hidden symbol
72 fun_hidden:
73 la.tls.desc $a0, hd1
74 la.tls.desc $a0, hd2