[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / COFF / autoimport-warn.s
blobeead0fed861f8f4115eedc3657f2b09141c20a35
1 # REQUIRES: x86
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
13 .global main
14 .text
15 main:
16 movq .refptr.variable1(%rip), %rax
17 movl (%rax), %eax
18 movl variable2(%rip), %ecx
19 addl %ecx, %eax
20 ret
21 .global _pei386_runtime_relocator
22 _pei386_runtime_relocator:
23 ret
25 .section .rdata$.refptr.variable1,"dr",discard,.refptr.variable1
26 .global .refptr.variable1
27 .refptr.variable1:
28 .quad variable1
30 relocs:
31 .quad __RUNTIME_PSEUDO_RELOC_LIST__
32 .quad __RUNTIME_PSEUDO_RELOC_LIST_END__