brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · eead0fe Raw
33 lines · plain
1# REQUIRES: x862 3# RUN: echo -e "EXPORTS\nvariable1 DATA\nvariable2 DATA" > %t-lib.def4# RUN: llvm-dlltool -m i386:x86-64 -d %t-lib.def -D lib.dll -l %t-lib.lib5 6# RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.obj7# RUN: lld-link -lldmingw -out:%t.exe -entry:main %t.obj %t-lib.lib -verbose 2>&1 | FileCheck %s8 9# CHECK-NOT: runtime pseudo relocation {{.*}} against symbol variable110# CHECK: warning: runtime pseudo relocation in {{.*}}.obj against symbol variable2 is too narrow (only 32 bits wide); this can fail at runtime depending on memory layout11# CHECK-NOT: runtime pseudo relocation {{.*}} against symbol variable112 13    .global main14    .text15main:16    movq .refptr.variable1(%rip), %rax17    movl (%rax), %eax18    movl variable2(%rip), %ecx19    addl %ecx, %eax20    ret21    .global _pei386_runtime_relocator22_pei386_runtime_relocator:23    ret24 25    .section .rdata$.refptr.variable1,"dr",discard,.refptr.variable126    .global .refptr.variable127.refptr.variable1:28    .quad variable129 30relocs:31    .quad __RUNTIME_PSEUDO_RELOC_LIST__32    .quad __RUNTIME_PSEUDO_RELOC_LIST_END__33