summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-06-02 17:48:06 +0000
committerReid Kleckner <rnk@google.com>2017-06-02 17:48:06 +0000
commit5a1ed789e19a9630711b0d23415bc598c9981b80 (patch)
treeb9bc3341dbc6d631b784de219f50bdde4139caec
parentbe6c0ca5e2fc352d9fae71adc88ec91603fd2b48 (diff)
downloadbcm5719-llvm-5a1ed789e19a9630711b0d23415bc598c9981b80.tar.gz
bcm5719-llvm-5a1ed789e19a9630711b0d23415bc598c9981b80.zip
Add test case for LLD/COFF for stdcall exports in .def files
The .def file parser changes I reverted broke this test case, and exported "__imp__foo" instead of "__imp__foo@8". This was http://crbug.com/728726. llvm-svn: 304572
-rw-r--r--lld/test/COFF/def-export-stdcall.s25
1 files changed, 25 insertions, 0 deletions
diff --git a/lld/test/COFF/def-export-stdcall.s b/lld/test/COFF/def-export-stdcall.s
new file mode 100644
index 00000000000..cdca7ae76ac
--- /dev/null
+++ b/lld/test/COFF/def-export-stdcall.s
@@ -0,0 +1,25 @@
+# RUN: llvm-mc -filetype=obj -triple=i686-windows-msvc %s -o %t.obj
+# RUN: echo -e "LIBRARY foo\nEXPORTS\n stdcall" > %t.def
+# RUN: lld-link -entry:dllmain -dll -def:%t.def %t.obj -out:%t.dll -implib:%t.lib
+# RUN: llvm-nm %t.lib | FileCheck %s
+# CHECK: __imp__stdcall@8
+# CHECK: _stdcall@8
+
+ .def _stdcall@8;
+ .scl 2;
+ .type 32;
+ .endef
+ .globl _stdcall@8
+_stdcall@8:
+ movl 8(%esp), %eax
+ addl 4(%esp), %eax
+ retl $8
+
+ .def _dllmain;
+ .scl 2;
+ .type 32;
+ .endef
+ .globl _dllmain
+_dllmain:
+ retl
+
OpenPOWER on IntegriCloud