2 # RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
3 # RUN: ld.lld -shared %t.o -o %t.so
4 # RUN: llvm-readobj -d -r %t.so | FileCheck %s --check-prefix=IE-REL
5 # RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex %t.so | FileCheck %s --check-prefix=IE
7 # RUN: ld.lld %t.o -o %t
8 # RUN: llvm-readobj -d -r %t | FileCheck %s --check-prefix=LE-REL
9 # RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t | FileCheck %s --check-prefix=LE
11 # IE-REL: FLAGS STATIC_TLS
13 # IE-REL-NEXT: 0x20390 R_AARCH64_TLS_TPREL64 - 0xC
14 # IE-REL-NEXT: 0x20388 R_AARCH64_TLS_TPREL64 a 0x0
17 # IE: adrp x0, 0x20000
18 # IE-NEXT: ldr x0, [x0, #0x388]
19 # IE-NEXT: adrp x1, 0x20000
20 # IE-NEXT: ldr x1, [x1, #0x390]
23 # LE-REL: Relocations [
26 ## TP is followed by a gap of 2 words, followed by alignment padding (empty in this case), then the static TLS blocks.
27 ## a's offset is 16+8=24.
28 # LE: movz x0, #0, lsl #16
29 # LE-NEXT: movk x0, #24
30 # LE-NEXT: movz x1, #0, lsl #16
31 # LE-NEXT: movk x1, #28
36 ldr x0
, [x0
, #:gottprel_lo12:a]
38 ldr x1
, [x1
, #:gottprel_lo12:b]
40 .section .tbss,"awT",%nobits