1# REQUIRES: aarch64 2# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %p/Inputs/aarch64-tls-ie.s -o %ttlsie.o 3# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %s -o %tmain.o 4# RUN: ld.lld %tmain.o %ttlsie.o -o %tout 5# RUN: llvm-objdump -d --no-show-raw-insn %tout | FileCheck %s 6# RUN: llvm-readobj -r %tout | FileCheck -check-prefix=RELOC %s 7 8## Local-Dynamic to Local-Exec relax creates no dynamic relocations. 9# RELOC: Relocations [ 10# RELOC-NEXT: ] 11 12# TCB size = 0x16 and foo is first element from TLS register. 13# CHECK-LABEL: <_start>: 14# CHECK-NEXT: 2101c8: movz x0, #0, lsl #16 15# CHECK-NEXT: 2101cc: movk x0, #16 16# CHECK-NEXT: 2101d0: nop 17# CHECK-NEXT: 2101d4: nop 18 19.globl _start 20_start: 21 adrp x0, :tlsdesc:foo 22 ldr x1, [x0, :tlsdesc_lo12:foo] 23 add x0, x0, :tlsdesc_lo12:foo 24 .tlsdesccall foo 25 blr x1 26