brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · b429b94 Raw
70 lines · plain
1# RUN: rm -rf %t && mkdir -p %t2# RUN: llvm-mc -triple=x86_64-windows-msvc -x86-relax-relocations=false \3# RUN:   -position-independent -filetype=obj -o %t/coff_sm_reloc.o %s4# RUN: llvm-jitlink -noexec \5# RUN:              -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \6# RUN:              -abs external_data=0xdeadbeef \7# RUN:              -check %s %t/coff_sm_reloc.o8 9	.text10 11	.def main;12	.scl 2;13	.type 32;14	.endef15	.globl main16	.p2align 4, 0x9017main:18	retq19 20# Check a IMAGE_REL_AMD64_REL32 relocation to local function symbol.21# jitlink-check: decode_operand(test_rel32_func, 0) = named_func - next_pc(test_rel32_func)22	.def test_rel32_func;23	.scl 2;24	.type 32;25	.endef26	.globl test_rel32_func27	.p2align 4, 0x9028test_rel32_func:29	callq named_func30 31# Check a IMAGE_REL_AMD64_REL32 relocation to local data symbol.32# jitlink-check: decode_operand(test_rel32_data, 4) = named_data - next_pc(test_rel32_data)33	.def test_rel32_data;34	.scl 2;35	.type 32;36	.endef37	.globl test_rel32_data38	.p2align 4, 0x9039test_rel32_data:40    leaq named_data(%rip), %rax41 42# Check IMAGE_REL_AMD64_ADDR64 sets address of symbol to the fixup position.43# jitlink-check: *{8}(test_addr64) = named_data44	.text45	.def named_func;46	.scl 2;47	.type 32;48	.endef49	.globl test_addr6450	.p2align 4, 0x9051test_addr64:52	.quad named_data53 54# Local named data/func that is used in conjunction with other test cases55	.text56	.def named_func;57	.scl 2;58	.type 32;59	.endef60	.globl named_func61	.p2align 4, 0x9062named_func:63	retq64 65	.data66	.p2align 367named_data:68	.quad 5369 70