summaryrefslogtreecommitdiff
path: root/test/COFF/dllexport-mingw.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/COFF/dllexport-mingw.s')
-rw-r--r--test/COFF/dllexport-mingw.s24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/COFF/dllexport-mingw.s b/test/COFF/dllexport-mingw.s
new file mode 100644
index 000000000000..8bf035b36dcf
--- /dev/null
+++ b/test/COFF/dllexport-mingw.s
@@ -0,0 +1,24 @@
+# REQEUIRES: x86
+
+# RUN: llvm-mc -triple=i686-windows-gnu %s -filetype=obj -o %t.obj
+
+# RUN: lld-link -lldmingw -dll -out:%t.dll -entry:main %t.obj -implib:%t.lib
+# RUN: llvm-readobj %t.lib | FileCheck %s
+
+# CHECK: Symbol: __imp___underscoredFunc
+# CHECK: Symbol: __underscoredFunc
+# CHECK: Symbol: __imp__func
+# CHECK: Symbol: _func
+
+.global _main
+.global _func
+.global __underscoredFunc
+.text
+_main:
+ ret
+_func:
+ ret
+__underscoredFunc:
+ ret
+.section .drectve
+.ascii "-export:func -export:_underscoredFunc"