brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 71caa0f Raw
39 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-cloudabi %s -o %t1.o3# RUN: ld.lld -pie %t1.o -o %t4# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOCS %s5# RUN: llvm-objdump -d --no-show-raw-insn --no-print-imm-hex --no-leading-addr %t1.o | FileCheck --check-prefix=DIS %s6 7# Bug 27174: R_X86_64_TPOFF32 and R_X86_64_GOTTPOFF relocations should8# be eliminated when building a PIE executable, as the static TLS layout9# is fixed.10#11# RELOCS:      Relocations [12# RELOCS-NEXT: ]13#14# DIS: <_start>:15# DIS-NEXT:                movq    %fs:0, %rax16# DIS-NEXT:                movl    $3, (%rax)17# DIS-NEXT:                movq    %fs:0, %rdx18# DIS-NEXT:                movq    (%rip), %rcx19# DIS-NEXT:                movl    $3, (%rdx,%rcx)20# DIS-NEXT:                movabsq 0, %rax21 22	.globl	_start23_start:24	movq	%fs:0, %rax25	movl	$3, i@TPOFF(%rax)26 27	movq	%fs:0, %rdx28	movq	i@GOTTPOFF(%rip), %rcx29	movl	$3, (%rdx,%rcx)30 31	# This additionally tests support for R_X86_64_TPOFF64 relocations.32	movabs  i@TPOFF, %rax33 34	.section	.tbss.i,"awT",@nobits35	.globl	i36i:37	.long	038	.size	i, 439