xref: /llvm-project/lld/test/COFF/import_weak_alias.test (revision 5e23b66699d1066ce10b14a74d6137303517b2f3)
1# REQUIRES: x86
2
3# RUN: split-file %s %t.dir
4# RUN: llvm-mc --filetype=obj -triple=x86_64-windows-msvc %t.dir/foo.s -o %t.foo.obj
5# RUN: llvm-mc --filetype=obj -triple=x86_64-windows-msvc %t.dir/qux.s -o %t.qux.obj
6# RUN: lld-link %t.qux.obj %t.foo.obj -out:%t.dll -dll
7#
8#--- foo.s
9.text
10bar:
11  ret
12
13.weak foo
14.set foo, bar
15#--- qux.s
16.text
17.global _DllMainCRTStartup
18_DllMainCRTStartup:
19  call *__imp_foo(%rip)
20  ret
21