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 --check-prefix=RELOCS %s
5 # RUN: llvm-objdump -d --no-show-raw-insn --no-print-imm-hex --no-leading-addr %t1.o | FileCheck --check-prefix=DIS %s
7 # Bug 27174: R_X86_64_TPOFF32 and R_X86_64_GOTTPOFF relocations should
8 # be eliminated when building a PIE executable, as the static TLS layout
11 # RELOCS: Relocations [
15 # DIS-NEXT: movq %fs:0, %rax
16 # DIS-NEXT: movl $3, (%rax)
17 # DIS-NEXT: movq %fs:0, %rdx
18 # DIS-NEXT: movq (%rip), %rcx
19 # DIS-NEXT: movl $3, (%rdx,%rcx)
20 # DIS-NEXT: movabsq 0, %rax
25 movl $
3, i@TPOFF
(%rax
)
28 movq i@GOTTPOFF
(%rip
), %rcx
31 # This additionally tests support for R_X86_64_TPOFF64 relocations.
34 .section .tbss.i,"awT",@nobits