1# REQUIRES: x86 2 3# RUN: llvm-mc -filetype=obj -triple=i386 %s -o %t.o 4# RUN: ld.lld %t.o -o %t 5# RUN: llvm-readelf -S -l %t | FileCheck --check-prefix=SEC %s 6# RUN: llvm-objdump -d %t | FileCheck --check-prefix=DIS %s 7 8# SEC: Name Type Address Off Size ES Flg Lk Inf Al 9# SEC: .tdata PROGBITS 00402200 000200 000001 00 WAT 0 0 1 10# SEC: .tbss NOBITS 00402300 000201 000008 00 WAT 0 0 256 11 12# SEC: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align 13# SEC: TLS 0x000200 0x00402200 0x00402200 0x00001 0x00108 R 0x100 14 15## a@tprel = st_value(a) - p_memsz - (-p_vaddr-p_memsz & p_align-1) 16## = 0 - 256 - 0 = -256 17# DIS: leal -256(%ecx), %eax 18 19lea a@ntpoff(%ecx), %eax 20 21.section .tdata,"awT" 22.byte 0 23 24.section .tbss,"awT" 25.p2align 8 26a: 27.quad 0 28