1 # RUN: sed 's/ENTRY1/WinMain/;s/ENTRY2/main/' %s | yaml2obj > %t.obj
2 # RUN: not lld-link /subsystem:windows /out:%t.exe %t.obj > %t.log 2>&1
3 # RUN: FileCheck -check-prefix=WINMAIN %s < %t.log
5 # RUN: sed 's/ENTRY1/wWinMain/;s/ENTRY2/main/' %s | yaml2obj > %t.obj
6 # RUN: not lld-link /subsystem:windows /out:%t.exe %t.obj > %t.log 2>&1
7 # RUN: FileCheck -check-prefix=WWINMAIN %s < %t.log
9 # RUN: sed 's/ENTRY1/WinMain/;s/ENTRY2/main/' %s | yaml2obj > %t.obj
10 # RUN: not lld-link /subsystem:console /out:%t.exe %t.obj > %t.log 2>&1
11 # RUN: FileCheck -check-prefix=MAIN %s < %t.log
13 # RUN: sed 's/ENTRY1/WinMain/;s/ENTRY2/wmain/' %s | yaml2obj > %t.obj
14 # RUN: not lld-link /subsystem:console /out:%t.exe %t.obj > %t.log 2>&1
15 # RUN: FileCheck -check-prefix=WMAIN %s < %t.log
17 # RUN: sed 's/ENTRY1/wmain/;s/ENTRY2/main/' %s | yaml2obj > %t.obj
18 # RUN: not lld-link /out:%t.exe %t.obj > %t.log 2>&1
19 # RUN: FileCheck -check-prefix=MAINWMAIN %s < %t.log
21 # RUN: sed 's/ENTRY1/wWinMain/;s/ENTRY2/WinMain/' %s | yaml2obj > %t.obj
22 # RUN: not lld-link /out:%t.exe %t.obj > %t.log 2>&1
23 # RUN: FileCheck -check-prefix=WINMAINWWINMAIN %s < %t.log
25 # MAIN: error: <root>: undefined symbol: mainCRTStartup
26 # WMAIN: error: <root>: undefined symbol: wmainCRTStartup
27 # MAINWMAIN: warning: found both wmain and main; using latter
28 # MAINWMAIN: error: <root>: undefined symbol: mainCRTStartup
29 # WINMAIN: error: <root>: undefined symbol: WinMainCRTStartup
30 # WWINMAIN: error: <root>: undefined symbol: wWinMainCRTStartup
31 # WINMAINWWINMAIN: warning: found both wWinMain and WinMain; using latter
32 # WINMAINWWINMAIN: error: <root>: undefined symbol: WinMainCRTStartup
36 Machine: IMAGE_FILE_MACHINE_AMD64
40 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
42 SectionData: B82A000000C3
47 SimpleType: IMAGE_SYM_TYPE_NULL
48 ComplexType: IMAGE_SYM_DTYPE_NULL
49 StorageClass: IMAGE_SYM_CLASS_STATIC
52 NumberOfRelocations: 0
53 NumberOfLinenumbers: 0
59 SimpleType: IMAGE_SYM_TYPE_NULL
60 ComplexType: IMAGE_SYM_DTYPE_NULL
61 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
65 SimpleType: IMAGE_SYM_TYPE_NULL
66 ComplexType: IMAGE_SYM_DTYPE_NULL
67 StorageClass: IMAGE_SYM_CLASS_EXTERNAL