2 // RUN
: rm
-rf
%t && split-file
%s
%t && cd
%t
5 .section .tbss,"awT",@nobits
11 // RUN
: llvm-mc
-filetype
=obj
-triple
=aarch64-pc-linux
-mattr
=+pauth ok.s
-o ok.o
12 // RUN
: ld.lld
-shared ok.o
-o ok.so
13 // RUN
: llvm-objdump
--no-print-imm-hex
-d
--no-show-raw-insn ok.so | \
14 // RUN
: FileCheck
-DP
=20 -DA
=896 -DB
=912 -DC
=928 %s
15 // RUN
: llvm-readobj
-r
-x
.got ok.so | FileCheck --check-prefix=REL \
16 // RUN
: -DP1
=20 -DA1
=380 -DB1
=390 -DC1
=3A0
-DP2
=020 -DA2
=380 -DB2
=390 -DC2
=3a0
%s
18 // RUN
: llvm-mc
-filetype
=obj
-triple
=aarch64-pc-linux
-mattr
=+pauth
a.s
-o
a.so.o
19 // RUN
: ld.lld
-shared
a.so.o
-soname
=so
-o
a.so
20 // RUN
: ld.lld ok.o
a.so
-o ok
21 // RUN
: llvm-objdump
--no-print-imm-hex
-d
--no-show-raw-insn ok | \
22 // RUN
: FileCheck
-DP
=220 -DA
=936 -DB
=952 -DC
=968 %s
23 // RUN
: llvm-readobj
-r
-x
.got ok | FileCheck --check-prefix=REL \
24 // RUN
: -DP1
=220 -DA1
=3A8
-DB1
=3B8
-DC1
=3C8
-DP2
=220 -DA2
=3a8
-DB2
=3b8
-DC2
=3c8
%s
27 adrp x0
, :tlsdesc_auth
:a
28 ldr x16
, [x0
, :tlsdesc_auth_lo12
:a]
29 add x0
, x0
, :tlsdesc_auth_lo12
:a
32 // CHECK
: adrp x0
, 0x
[[P
]]000
33 // CHECK-NEXT
: ldr x16
, [x0
, #[[A]]]
34 // CHECK-NEXT
: add x0
, x0
, #[[A]]
35 // CHECK-NEXT
: blraa x16
, x0
37 /// Create relocation against local TLS symbols where linker should
38 /// create target specific dynamic TLSDESC relocation where addend is
39 /// the symbol VMA in tls block.
41 adrp x0
, :tlsdesc_auth
:local1
42 ldr x16
, [x0
, :tlsdesc_auth_lo12
:local1
]
43 add x0
, x0
, :tlsdesc_auth_lo12
:local1
46 // CHECK
: adrp x0
, 0x
[[P
]]000
47 // CHECK-NEXT
: ldr x16
, [x0
, #[[B]]]
48 // CHECK-NEXT
: add x0
, x0
, #[[B]]
49 // CHECK-NEXT
: blraa x16
, x0
51 adrp x0
, :tlsdesc_auth
:local2
52 ldr x16
, [x0
, :tlsdesc_auth_lo12
:local2
]
53 add x0
, x0
, :tlsdesc_auth_lo12
:local2
56 // CHECK
: adrp x0
, 0x
[[P
]]000
57 // CHECK-NEXT
: ldr x16
, [x0
, #[[C]]]
58 // CHECK-NEXT
: add x0
, x0
, #[[C]]
59 // CHECK-NEXT
: blraa x16
, x0
61 .section .tbss,"awT",@nobits
75 // R_AARCH64_AUTH_TLSDESC
- 0x0 -> start of tls block
76 // R_AARCH64_AUTH_TLSDESC
- 0x8 -> align
(sizeof
(local1
), 8)
79 // REL-NEXT
: Section
(5) .rela.dyn {
80 // REL-NEXT
: 0x
[[P1
]][[B1
]] R_AARCH64_AUTH_TLSDESC
- 0x0
81 // REL-NEXT
: 0x
[[P1
]][[C1
]] R_AARCH64_AUTH_TLSDESC
- 0x8
82 // REL-NEXT
: 0x
[[P1
]][[A1
]] R_AARCH64_AUTH_TLSDESC
a 0x0
86 // REL
: Hex dump of section
'.got':
87 // REL-NEXT
: 0x00[[P2
]][[A2
]] 00000000 00000080 00000000 000000a0
88 // REL-NEXT
: 0x00[[P2
]][[B2
]] 00000000 00000080 00000000 000000a0
89 // REL-NEXT
: 0x00[[P2
]][[C2
]] 00000000 00000080 00000000 000000a0
91 /// 0b10000000 bit
63 address diversity
= true
, bits
61..60 key = IA
93 /// 0b10100000 bit
63 address diversity
= true
, bits
61..60 key = DA
96 // RUN
: llvm-mc
-filetype
=obj
-triple
=aarch64-pc-linux
-mattr
=+pauth err1.s
-o err1.o
97 // RUN
: not ld.lld
-shared err1.o
2>&1 | FileCheck
--check-prefix
=ERR1
--implicit-check-
not=error
: %s
98 // ERR1
: error
: both AUTH
and non-AUTH TLSDESC entries for
'a' requested
, but only one type of TLSDESC entry per symbol is supported
100 adrp x0
, :tlsdesc_auth
:a
101 ldr x16
, [x0
, :tlsdesc_auth_lo12
:a]
102 add x0
, x0
, :tlsdesc_auth_lo12
:a
106 ldr x1
, [x0
, :tlsdesc_lo12
:a]
107 add x0
, x0
, :tlsdesc_lo12
:a
111 // RUN
: llvm-mc
-filetype
=obj
-triple
=aarch64-pc-linux
-mattr
=+pauth err2.s
-o err2.o
112 // RUN
: not ld.lld
-shared err2.o
2>&1 | FileCheck
--check-prefix
=ERR2
--implicit-check-
not=error
: %s
113 // ERR2
: error
: both AUTH
and non-AUTH TLSDESC entries for
'a' requested
, but only one type of TLSDESC entry per symbol is supported
116 ldr x1
, [x0
, :tlsdesc_lo12
:a]
117 add x0
, x0
, :tlsdesc_lo12
:a
120 adrp x0
, :tlsdesc_auth
:a
121 ldr x16
, [x0
, :tlsdesc_auth_lo12
:a]
122 add x0
, x0
, :tlsdesc_auth_lo12
:a
126 // RUN
: llvm-mc
-filetype
=obj
-triple
=aarch64-pc-linux
-mattr
=+pauth err3.s
-o err3.o
127 // RUN
: not ld.lld
-shared err3.o
2>&1 | FileCheck
--check-prefix
=ERR3
--implicit-check-
not=error
: %s
128 // ERR3
: error
: both AUTH
and non-AUTH TLSDESC entries for
'a' requested
, but only one type of TLSDESC entry per symbol is supported
130 adrp x0
, :tlsdesc_auth
:a
131 ldr x16
, [x0
, :tlsdesc_auth_lo12
:a]
132 add x0
, x0
, :tlsdesc_auth_lo12
:a