1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-cloudabi %s -o %t1.o 3# RUN: ld.lld -pie %t1.o -o %t 4# RUN: llvm-readobj -r %t | FileCheck %s 5 6# Bug 27174: R_X86_64_TPOFF32 and R_X86_64_GOTTPOFF relocations should 7# be eliminated when building a PIE executable, as the static TLS layout 8# is fixed. 9# 10# CHECK: Relocations [ 11# CHECK-NEXT: ] 12 13 .globl _start 14_start: 15 movq %fs:0, %rax 16 movl $3, i@TPOFF(%rax) 17 18 movq %fs:0, %rdx 19 movq i@GOTTPOFF(%rip), %rcx 20 movl $3, (%rdx,%rcx) 21 22 .section .tbss.i,"awT",@nobits 23 .globl i 24i: 25 .long 0 26 .size i, 4 27