3 # RUN: yaml2obj %p/Inputs/entry.obj.yaml > %t.obj
5 # RUN: not lld -flavor link /out:%t.exe /alternatename:_main=_foo \
6 # RUN: -- %t.obj 2> %t.log
7 # RUN: FileCheck -check-prefix=MAIN %s < %t.log
11 # RUN: not lld -flavor link /out:%t.exe /alternatename:_wmain=_foo \
12 # RUN: -- %t.obj 2> %t.log
13 # RUN: FileCheck -check-prefix=WMAIN %s < %t.log
15 WMAIN: _wmainCRTStartup
17 # RUN: not lld -flavor link /out:%t.exe /alternatename:_WinMain=_foo \
18 # RUN: -- %t.obj 2> %t.log
19 # RUN: FileCheck -check-prefix=WINMAIN %s < %t.log
20 # RUN: not lld -flavor link /out:%t.exe /alternatename:_WinMain@16=_foo \
21 # RUN: -- %t.obj 2> %t.log
22 # RUN: FileCheck -check-prefix=WINMAIN %s < %t.log
24 WINMAIN: _WinMainCRTStartup
26 # RUN: not lld -flavor link /out:%t.exe /alternatename:_wWinMain=_foo \
27 # RUN: -- %t.obj 2> %t.log
28 # RUN: FileCheck -check-prefix=WWINMAIN %s < %t.log
30 WWINMAIN: _wWinMainCRTStartup
32 # RUN: lld -flavor link /out:%t.exe /alternatename:_main=_foo \
33 # RUN: /alternatename:_mainCRTStartup=_bar -- %t.obj
34 # RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=MAINADDR %s
36 MAINADDR: AddressOfEntryPoint: 0x1004
38 # RUN: lld -flavor link /out:%t.exe /subsystem:console /entry:baz -- %t.obj
39 # RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=MANGLE %s
41 MANGLE: AddressOfEntryPoint: 0x1004