3 # RUN: echo -e "EXPORTS\nvariable1 DATA\nvariable2 DATA" > %t-lib.def
4 # RUN: llvm-dlltool -m i386:x86-64 -d %t-lib.def -D lib.dll -l %t-lib.lib
6 # RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.obj
7 # RUN: lld-link -lldmingw -out:%t.exe -entry:main %t.obj %t-lib.lib -verbose 2>&1 | FileCheck %s
9 # CHECK-NOT: runtime pseudo relocation {{.*}} against symbol variable1
10 # 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 layout
11 # CHECK-NOT: runtime pseudo relocation {{.*}} against symbol variable1
16 movq
.refptr.variable1(%rip), %rax
18 movl variable2
(%rip
), %ecx
21 .global _pei386_runtime_relocator
22 _pei386_runtime_relocator
:
25 .section .rdata$.refptr.variable1,"dr",discard,.refptr.variable1
26 .global .refptr.variable1
31 .quad __RUNTIME_PSEUDO_RELOC_LIST__
32 .quad __RUNTIME_PSEUDO_RELOC_LIST_END__