]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/pecoff/entry.test
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / pecoff / entry.test
1 # REQUIRES: asserts
2
3 # RUN: yaml2obj %p/Inputs/entry.obj.yaml > %t.obj
4
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
8
9 MAIN: _mainCRTStartup
10
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
14
15 WMAIN: _wmainCRTStartup
16
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
23
24 WINMAIN: _WinMainCRTStartup
25
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
29
30 WWINMAIN: _wWinMainCRTStartup
31
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
35
36 MAINADDR: AddressOfEntryPoint: 0x1004
37
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
40
41 MANGLE: AddressOfEntryPoint: 0x1004