1// REQUIRES: x86 2// RUN: split-file %s %t.dir 3// RUN: llvm-mc -filetype=obj -triple=x86_64-win32-gnu %t.dir/main.s -o %t.main.obj 4// RUN: llvm-mc -filetype=obj -triple=x86_64-win32-gnu %t.dir/wrap.s -o %t.wrap.obj 5// RUN: llvm-mc -filetype=obj -triple=x86_64-win32-gnu %t.dir/other.s -o %t.other.obj 6// RUN: rm -f %t.lib 7// RUN: llvm-ar rcs %t.lib %t.wrap.obj %t.other.obj 8 9// RUN: lld-link -out:%t.exe %t.main.obj -libpath:%T %t.lib -entry:entry -subsystem:console -wrap:foo 10 11// Note: No real definition of foo exists here, but that works fine as long 12// as there's no actual references to __real_foo. 13 14#--- main.s 15.global entry 16entry: 17 call foo 18 ret 19 20#--- wrap.s 21.global __wrap_foo 22__wrap_foo: 23 call other_func 24 ret 25 26#--- other.s 27.global other_func 28other_func: 29 ret 30