]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - ld/testsuite/ld-aarch64/morello-tlsie-shared.d
Add linker tests for TLS changes
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-aarch64 / morello-tlsie-shared.d
CommitLineData
a7442448
MM
1# Checking the following:
2# Relaxations have not occured.
3# Values point to the GOT.
4# Fragment in GOT contains size hint if known.
5# Fragment in GOT does not contain any offset (except for the relocation
6# against a local symbol where the fragment is populated in order to give
7# the dynamic loader a base to use).
8#
9# Check the disassembly of rodata just to demonstrate we haven't emitted the
10# TLS data stubs for an IE -> LE relaxation.
11#
12# Also check the behavior on a global and local symbol to check the behaviour
13# of a local symbol.
14#source: morello-tlsie.s
15#target: [check_shared_lib_support]
16#as: -march=morello+c64
17#ld: -shared
18#objdump: -DR -j .rodata -j .text -j .got
19
20.*: +file format .*
21
22
23Disassembly of section \.text:
24
25[0-9a-f]+ <_start>:
26#record: GOT_PAGE
27 +[0-9a-f]+: [0-9a-f]+ adrp c2, ([0-9a-f]+) .*
28#record: VAR1_OFFSET
29 +[0-9a-f]+: [0-9a-f]+ add c2, c2, #0x([0-9a-f]+)
30 +[0-9a-f]+: a9400442 ldp x2, x1, \[c2\]
31#check: PAGE string tolower $GOT_PAGE
32 +[0-9a-f]+: [0-9a-f]+ adrp c2, PAGE .*
33#record: VAR2_OFFSET
34 +[0-9a-f]+: [0-9a-f]+ add c2, c2, #0x([0-9a-f]+)
35 +[0-9a-f]+: a9400442 ldp x2, x1, \[c2\]
36 +[0-9a-f]+: [0-9a-f]+ adrp c2, PAGE .*
37#record: VAR3_OFFSET
38 +[0-9a-f]+: [0-9a-f]+ add c2, c2, #0x([0-9a-f]+)
39 +[0-9a-f]+: a9400442 ldp x2, x1, \[c2\]
40 +[0-9a-f]+: [0-9a-f]+ adrp c2, PAGE .*
41#record: VAR4_OFFSET
42 +[0-9a-f]+: [0-9a-f]+ add c2, c2, #0x([0-9a-f]+)
43 +[0-9a-f]+: a9400442 ldp x2, x1, \[c2\]
44
45Disassembly of section \.rodata:
46
47# This is just the "Hello world\n" we put there to cause some interference with
48# the .rodata section we create for the static tests.
49[0-9a-f]+ <.*>:
50 +[0-9a-f]+: 6c6c6548 ldnp d8, d25, \[x10, #-320\]
51 +[0-9a-f]+: 6f77206f umlal2 v15.4s, v3.8h, v7.h\[3\]
52 +[0-9a-f]+: 0a646c72 bic w18, w3, w4, lsr #27
53 \.\.\.
54
55Disassembly of section \.got:
56
57[0-9a-f]+ <\.got>:
58 +[0-9a-f]+: .*
59 \.\.\.
60#check: VAR4_LOC aarch64_page_plus_offset $GOT_PAGE $VAR4_OFFSET
61#check: VAR3_LOC aarch64_page_plus_offset $GOT_PAGE $VAR3_OFFSET
62#check: VAR2_LOC aarch64_page_plus_offset $GOT_PAGE $VAR2_OFFSET
63#check: VAR1_LOC aarch64_page_plus_offset $GOT_PAGE $VAR1_OFFSET
64#check: VAR4_TLS_OFFSET format %08x [expr "65592 + 65540 + 100 + 10"]
65#check: VAR4_TLS_OFF format %x [expr "65592 + 65540 + 100 + 10"]
66#check: VAR3_TLS_OFFSET format %08x [expr "65592 + 65540 + 100"]
67#check: VAR3_TLS_OFF format %x [expr "65592 + 65540 + 100"]
68#check: VAR2_TLS_OFFSET format %08x [expr "65592 + 65540"]
69#check: VAR2_TLS_OFF format %x [expr "65592 + 65540"]
70 +VAR2_LOC: VAR2_TLS_OFFSET .*
71 VAR2_LOC: R_MORELLO_TPREL128 \*ABS\*\+0xVAR2_TLS_OFF
72 +[0-9a-f]+: 00000000 .*
73 +[0-9a-f]+: 00000064 .*
74 +[0-9a-f]+: 00000000 .*
75 +VAR3_LOC: VAR3_TLS_OFFSET .*
76 VAR3_LOC: R_MORELLO_TPREL128 \*ABS\*\+0xVAR3_TLS_OFF
77 +[0-9a-f]+: 00000000 .*
78 +[0-9a-f]+: 0000000a .*
79 \.\.\.
80 VAR4_LOC: R_MORELLO_TPREL128 y
81 +[0-9a-f]+: 0000000f .*
82 ...
83 VAR1_LOC: R_MORELLO_TPREL128 a
84