brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 62e9a3f Raw
33 lines · plain
1# RUN: rm -rf %t && mkdir -p %t2# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj -o %t/test_ELF1_x86-64.o %s3# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj -o %t/test_ELF2_x86-64.o %s4# RUN: llc -mtriple=x86_64-pc-linux -filetype=obj -o %t/test_ELF_ExternalGlobal_x86-64.o %S/Inputs/ExternalGlobal.ll5# RUN: llvm-rtdyld -triple=x86_64-pc-linux -verify %t/test_ELF1_x86-64.o  %t/test_ELF_ExternalGlobal_x86-64.o6# Test that we can load this code twice at memory locations more than 2GB apart7# RUN: llvm-rtdyld -triple=x86_64-pc-linux -verify -map-section test_ELF1_x86-64.o,.got=0x10000 -map-section test_ELF2_x86-64.o,.text=0x100000000 -map-section test_ELF2_x86-64.o,.got=0x100010000 %t/test_ELF1_x86-64.o %t/test_ELF2_x86-64.o %t/test_ELF_ExternalGlobal_x86-64.o8 9# Assembly obtained by compiling the following and adding checks:10# @G = external global i8*11#12# define i8* @foo() {13#    %ret = load i8** @G14#    ret i32 %ret15# }16#17 18#19	.text20	.file	"ELF_x64-64_PIC_relocations.ll"21	.align	16, 0x9022	.type	foo,@function23foo:                                    # @foo24# %bb.0:25	movq	G@GOTPCREL(%rip), %rax26	movl	(%rax), %eax27	retq28.Ltmp0:29	.size	foo, .Ltmp0-foo30 31 32	.section	".note.GNU-stack","",@progbits33