hanchenye-llvm-project/lld/test/pecoff/entry.test

42 lines
1.3 KiB
Plaintext

# REQUIRES: asserts
# RUN: yaml2obj %p/Inputs/entry.obj.yaml > %t.obj
# RUN: not lld -flavor link /out:%t.exe /alternatename:_main=_foo \
# RUN: -- %t.obj 2> %t.log
# RUN: FileCheck -check-prefix=MAIN %s < %t.log
MAIN: _mainCRTStartup
# RUN: not lld -flavor link /out:%t.exe /alternatename:_wmain=_foo \
# RUN: -- %t.obj 2> %t.log
# RUN: FileCheck -check-prefix=WMAIN %s < %t.log
WMAIN: _wmainCRTStartup
# RUN: not lld -flavor link /out:%t.exe /alternatename:_WinMain=_foo \
# RUN: -- %t.obj 2> %t.log
# RUN: FileCheck -check-prefix=WINMAIN %s < %t.log
# RUN: not lld -flavor link /out:%t.exe /alternatename:_WinMain@16=_foo \
# RUN: -- %t.obj 2> %t.log
# RUN: FileCheck -check-prefix=WINMAIN %s < %t.log
WINMAIN: _WinMainCRTStartup
# RUN: not lld -flavor link /out:%t.exe /alternatename:_wWinMain=_foo \
# RUN: -- %t.obj 2> %t.log
# RUN: FileCheck -check-prefix=WWINMAIN %s < %t.log
WWINMAIN: _wWinMainCRTStartup
# RUN: lld -flavor link /out:%t.exe /alternatename:_main=_foo \
# RUN: /alternatename:_mainCRTStartup=_bar -- %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=MAINADDR %s
MAINADDR: AddressOfEntryPoint: 0x1004
# RUN: lld -flavor link /out:%t.exe /subsystem:console /entry:baz -- %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=MANGLE %s
MANGLE: AddressOfEntryPoint: 0x1004