summaryrefslogtreecommitdiff
path: root/test/COFF/subsystem-inference-mingw.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/COFF/subsystem-inference-mingw.s')
-rw-r--r--test/COFF/subsystem-inference-mingw.s17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/COFF/subsystem-inference-mingw.s b/test/COFF/subsystem-inference-mingw.s
new file mode 100644
index 000000000000..3339e6408af1
--- /dev/null
+++ b/test/COFF/subsystem-inference-mingw.s
@@ -0,0 +1,17 @@
+# REQUIRES: x86
+# RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.o
+
+# RUN: lld-link -lldmingw %t.o -out:%t.exe
+# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
+
+# CHECK: AddressOfEntryPoint: 0x1001
+# CHECK: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI (0x3)
+
+ .text
+ .globl foo
+ .globl mainCRTStartup
+foo:
+ ret
+mainCRTStartup:
+ call foo
+ ret