45 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.o3 4# RUN: lld-link -lldmingw %t.o -out:%t-default.exe 2>&1 | FileCheck -allow-empty -check-prefix=LINK %s5# RUN: lld-link -lldmingw %t.o -out:%t-cui.exe -subsystem:console 2>&1 | FileCheck -allow-empty -check-prefix=LINK %s6# RUN: lld-link -lldmingw %t.o -out:%t-gui.exe -subsystem:windows 2>&1 | FileCheck -allow-empty -check-prefix=LINK %s7 8# RUN: llvm-readobj --file-headers %t-default.exe | FileCheck -check-prefix=CUI %s9# RUN: llvm-readobj --file-headers %t-cui.exe | FileCheck -check-prefix=CUI %s10# RUN: llvm-readobj --file-headers %t-gui.exe | FileCheck -check-prefix=GUI %s11 12# Check that this doesn't print any warnings.13# LINK-NOT: found both wmain and main14 15# CUI: AddressOfEntryPoint: 0x100116# CUI: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI (0x3)17 18# GUI: AddressOfEntryPoint: 0x100219# GUI: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_GUI (0x2)20 21 22 .text23 .globl mainCRTStartup24 .globl WinMainCRTStartup25# MinGW only uses the entry points above, these other ones aren't26# used as entry.27 .globl main28 .globl wmain29 .globl wmainCRTStartup30 .globl wWinMainCRTStartup31foo:32 ret33mainCRTStartup:34 ret35WinMainCRTStartup:36 ret37main:38 ret39wmain:40 ret41wmainCRTStartup:42 ret43wWinMainCRTStartup:44 ret45