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# RUN: ld.lld -pie %tmain.o %ttlsie.o -o %tout 9# RUN: llvm-objdump -d --no-show-raw-insn %tout | FileCheck %s 10# RUN: llvm-readobj -r %tout | FileCheck -check-prefix=RELOC %s 11 12# Initial-Exec to Local-Exec relax creates no dynamic relocations. 13# RELOC: Relocations [ 14# RELOC-NEXT: ] 15 16# TCB size = 0x16 and foo is first element from TLS register. 17# CHECK: Disassembly of section .text: 18# CHECK-EMPTY: 19# CHECK: <_start>: 20# CHECK-NEXT: movz x0, #0, lsl #16 21# CHECK-NEXT: movk x0, #20 22# CHECK-NEXT: movz x0, #0, lsl #16 23# CHECK-NEXT: movk x0, #16 24 25.section .tdata 26.align 2 27.type foo_local, %object 28.size foo_local, 4 29foo_local: 30.word 5 31.text 32 33.globl _start 34_start: 35 adrp x0, :gottprel:foo 36 ldr x0, [x0, :gottprel_lo12:foo] 37 adrp x0, :gottprel:foo_local 38 ldr x0, [x0, :gottprel_lo12:foo_local] 39