150
|
1 # REQUIRES: x86
|
|
2 # RUN: llvm-mc -triple i686-windows-msvc %s -o %t.obj -filetype=obj
|
|
3 # RUN: lld-link -safeseh:no %t.obj -out:%t.dll -dll -nodefaultlib -noentry -export:foo_std=bar_std -export:foo_fast=bar_fast
|
|
4 # RUN: llvm-nm %t.lib | FileCheck %s
|
|
5
|
|
6 # MSVC fudges the lookup of 'bar' to allow it to find the stdcall function
|
|
7 # _bar_std@8, and then exports _foo_std@8. Same for fastcall and other mangling
|
|
8 # schemes.
|
|
9
|
|
10 # CHECK: export-stdcall.s.tmp.dll:
|
|
11 # CHECK: 00000000 T @foo_fast@8
|
|
12 # CHECK: 00000000 T __imp_@foo_fast@8
|
|
13
|
|
14 # CHECK: export-stdcall.s.tmp.dll:
|
|
15 # CHECK: 00000000 T __imp__foo_std@8
|
|
16 # CHECK: 00000000 T _foo_std@8
|
|
17
|
|
18 .text
|
|
19 .def _bar_std@8; .scl 2; .type 32; .endef
|
|
20 .globl _bar_std@8
|
|
21 _bar_std@8:
|
|
22 movl 8(%esp), %eax
|
|
23 movl 4(%esp), %ecx
|
|
24 leal 42(%ecx,%eax), %eax
|
|
25 retl $8
|
|
26
|
|
27 .def @bar_fast@8; .scl 2; .type 32; .endef
|
|
28 .globl @bar_fast@8
|
|
29 @bar_fast@8:
|
|
30 leal 42(%ecx,%eax), %eax
|
|
31 retl
|
|
32
|