1 # RUN: sed -e s/ENTRYNAME/main/ %s | yaml2obj > %t.obj
2 # RUN: not lld-link /out:%t.exe %t.obj > %t.log 2>&1
3 # RUN: FileCheck -check-prefix=MAIN %s < %t.log
4 # RUN: not lld-link /nodefaultlib /out:%t.exe %t.obj > %t.log 2>&1
5 # RUN: FileCheck -check-prefix=MAIN %s < %t.log
7 # Entry inference should work through /wholearchive:, they are also inputs.
8 # RUN: lld-link /lib %t.obj /out:%t.lib
9 # RUN: not lld-link /nodefaultlib /out:%t.exe /wholearchive:%t.lib > %t.log 2>&1
10 # RUN: FileCheck -check-prefix=MAIN %s < %t.log
12 # RUN: sed s/ENTRYNAME/wmain/ %s | yaml2obj > %t.obj
13 # RUN: not lld-link /out:%t.exe %t.obj > %t.log 2>&1
14 # RUN: FileCheck -check-prefix=WMAIN %s < %t.log
15 # RUN: not lld-link /nodefaultlib /out:%t.exe %t.obj > %t.log 2>&1
16 # RUN: FileCheck -check-prefix=WMAIN %s < %t.log
18 # RUN: sed s/ENTRYNAME/WinMain/ %s | yaml2obj > %t.obj
19 # RUN: not lld-link /out:%t.exe %t.obj > %t.log 2>&1
20 # RUN: FileCheck -check-prefix=WINMAIN %s < %t.log
21 # RUN: not lld-link /nodefaultlib /out:%t.exe %t.obj > %t.log 2>&1
22 # RUN: FileCheck -check-prefix=WINMAIN %s < %t.log
24 # RUN: sed s/ENTRYNAME/wWinMain/ %s | yaml2obj > %t.obj
25 # RUN: not lld-link /out:%t.exe %t.obj > %t.log 2>&1
26 # RUN: FileCheck -check-prefix=WWINMAIN %s < %t.log
27 # RUN: not lld-link /nodefaultlib /out:%t.exe %t.obj > %t.log 2>&1
28 # RUN: FileCheck -check-prefix=WWINMAIN %s < %t.log
30 # MAIN: error: <root>: undefined symbol: mainCRTStartup
31 # WMAIN: error: <root>: undefined symbol: wmainCRTStartup
32 # WINMAIN: error: <root>: undefined symbol: WinMainCRTStartup
33 # WWINMAIN: error: <root>: undefined symbol: wWinMainCRTStartup
37 Machine: IMAGE_FILE_MACHINE_AMD64
41 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
43 SectionData: B82A000000C3
48 SimpleType: IMAGE_SYM_TYPE_NULL
49 ComplexType: IMAGE_SYM_DTYPE_NULL
50 StorageClass: IMAGE_SYM_CLASS_STATIC
53 NumberOfRelocations: 0
54 NumberOfLinenumbers: 0
60 SimpleType: IMAGE_SYM_TYPE_NULL
61 ComplexType: IMAGE_SYM_DTYPE_NULL
62 StorageClass: IMAGE_SYM_CLASS_EXTERNAL