brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · c25fa27 Raw
83 lines · plain
1// REQUIRES: ppc2 3// RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t.o4// RUN: llvm-readelf -r %t.o | FileCheck --check-prefix=InputRelocs %s5// RUN: ld.lld  %t.o -o %t6// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefix=Dis %s7// RUN: llvm-readelf -r %t | FileCheck --check-prefix=OutputRelocs %s8 9// RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o10// RUN: llvm-readelf -r %t.o | FileCheck --check-prefix=InputRelocs %s11// RUN: ld.lld  %t.o -o %t12// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefix=Dis %s13// RUN: llvm-readelf -r %t | FileCheck --check-prefix=OutputRelocs %s14 15	.text16	.abiversion 217	.globl	_start                    # -- Begin function _start18	.p2align	419	.type	_start,@function20_start:                                   # @_start21.Lfunc_begin0:22.Lfunc_gep0:23	addis 2, 12, .TOC.-.Lfunc_gep0@ha24	addi 2, 2, .TOC.-.Lfunc_gep0@l25.Lfunc_lep0:26	.localentry	_start, .Lfunc_lep0-.Lfunc_gep027# %bb.0:                                # %entry28	mflr 029	std 31, -8(1)30	std 0, 16(1)31	stdu 1, -64(1)32	mr 31, 133	std 30, 48(31)                  # 8-byte Folded Spill34	li 3, 035	stw 3, 44(31)36	addis 3, 2, a@got@tlsld@ha37	addi 3, 3, a@got@tlsld@l38	bl __tls_get_addr(a@tlsld)39	nop40	addis 3, 3, a@dtprel@ha41	addi 3, 3, a@dtprel@l42	lwz 30, 0(3)43	extsw 3, 3044	ld 30, 48(31)                   # 8-byte Folded Reload45	addi 1, 1, 6446	ld 0, 16(1)47	ld 31, -8(1)48	mtlr 049	blr50	.long	051	.quad	052.Lfunc_end0:53	.size	_start, .Lfunc_end0-.Lfunc_begin054                                        # -- End function55 56	.type	a,@object               # @a57	.section	.tdata,"awT",@progbits58	.p2align	259a:60	.long	2                       # 0x261	.size	a, 462 63// Verify that the input has local-dynamic tls relocation types64// InputRelocs:  Relocation section '.rela.text'65// InputRelocs: R_PPC64_GOT_TLSLD16_HA  {{0+}}  a + 066// InputRelocs: R_PPC64_GOT_TLSLD16_LO  {{0+}}  a + 067// InputRelocs: R_PPC64_TLSLD           {{0+}}  a + 068 69// Verify that the local-dynamic sequence is relaxed to local exec.70// Dis: <_start>:71// Dis: nop72// Dis: addis 3, 13, 073// Dis: nop74// Dis: addi 3, 3, 409675 76// #ha(a@dtprel) --> (0x0 -0x8000 + 0x8000) >> 16 = 077// #lo(a@dtprel) --> (0x0 -0x8000) = -0x8000 = -3276878// Dis: addis 3, 3, 079// Dis: addi 3, 3, -3276880 81// Verify that no local-dynamic relocations exist for the dynamic linker.82// OutputRelocs-NOT: R_PPC64_DTPMOD6483