2 ; RUN
: split-file
%s
%t.dir
&& cd
%t.dir
4 ; RUN
: llvm-mc
-filetype
=obj
-triple
=arm64ec-windows test.s
-o test.obj
5 ; RUN
: llvm-mc
-filetype
=obj
-triple
=arm64ec-windows drectve.s
-o drectve.obj
6 ; RUN
: llvm-mc
-filetype
=obj
-triple
=arm64ec-windows
%S
/Inputs
/loadconfig-arm64ec.s
-o loadconfig-arm64ec.obj
8 ; Check various forms of export directive
and make sure that function export name is demangled.
10 ; RUN
: lld-link
-out
:out.dll test.obj loadconfig-arm64ec.obj
-dll
-noentry
-machine
:arm64ec \
11 ; RUN
: -export
:unmangled_func
'-export:#mangled_func' '-export:#exportas_func,EXPORTAS,exportas_func' \
12 ; RUN
: '-export:?cxx_func@@$$hYAHXZ' -export
:data_sym
,DATA
'-export:#mangled_data_sym,DATA'
15 ; RUN
: llvm-readobj
--coff-exports out.dll | FileCheck
--check-prefix
=EXP
%s
17 ; EXP-NEXT
: Ordinal
: 1
18 ; EXP-NEXT
: Name
: #mangled_data_sym
19 ; EXP-NEXT
: RVA
: 0x4000
22 ; EXP-NEXT
: Ordinal
: 2
23 ; EXP-NEXT
: Name
: ?cxx_func@@YAHXZ
24 ; EXP-NEXT
: RVA
: 0x2030
27 ; EXP-NEXT
: Ordinal
: 3
28 ; EXP-NEXT
: Name
: data_sym
29 ; EXP-NEXT
: RVA
: 0x4004
32 ; EXP-NEXT
: Ordinal
: 4
33 ; EXP-NEXT
: Name
: exportas_func
34 ; EXP-NEXT
: RVA
: 0x2020
37 ; EXP-NEXT
: Ordinal
: 5
38 ; EXP-NEXT
: Name
: mangled_func
39 ; EXP-NEXT
: RVA
: 0x2010
42 ; EXP-NEXT
: Ordinal
: 6
43 ; EXP-NEXT
: Name
: unmangled_func
44 ; EXP-NEXT
: RVA
: 0x2000
47 ; RUN
: llvm-nm
--print-armap out.lib | FileCheck
--check-prefix
=IMPLIB
%s
48 ; IMPLIB
: Archive EC map
49 ; IMPLIB-NEXT
: #exportas_func in out
50 ; IMPLIB-NEXT
: #mangled_func in out
51 ; IMPLIB-NEXT
: #unmangled_func in out
52 ; IMPLIB-NEXT
: ?cxx_func@@$$hYAHXZ in out
53 ; IMPLIB-NEXT
: ?cxx_func@@YAHXZ in out
54 ; IMPLIB-NEXT
: __IMPORT_DESCRIPTOR_out
{{.*}} in out
55 ; IMPLIB-NEXT
: __NULL_IMPORT_DESCRIPTOR in out
56 ; IMPLIB-NEXT
: __imp_?cxx_func@@YAHXZ in out
57 ; IMPLIB-NEXT
: __imp_aux_?cxx_func@@YAHXZ in out
58 ; IMPLIB-NEXT
: __imp_aux_exportas_func in out
59 ; IMPLIB-NEXT
: __imp_aux_mangled_func in out
60 ; IMPLIB-NEXT
: __imp_aux_unmangled_func in out
61 ; IMPLIB-NEXT
: __imp_data_sym in out
62 ; IMPLIB-NEXT
: __imp_exportas_func in out
63 ; IMPLIB-NEXT
: __imp_mangled_data_sym in out
64 ; IMPLIB-NEXT
: __imp_mangled_func in out
65 ; IMPLIB-NEXT
: __imp_unmangled_func in out
66 ; IMPLIB-NEXT
: exportas_func in out
67 ; IMPLIB-NEXT
: mangled_func in out
68 ; IMPLIB-NEXT
: unmangled_func in out
69 ; IMPLIB-NEXT
: out
{{.*}}_NULL_THUNK_DATA in out
72 ; Check that using
.drectve section has the same effect.
74 ; RUN
: lld-link
-out
:out2.dll test.obj loadconfig-arm64ec.obj
-dll
-noentry
-machine
:arm64ec drectve.obj
75 ; RUN
: llvm-readobj
--coff-exports out2.dll | FileCheck
--check-prefix
=EXP
%s
76 ; RUN
: llvm-nm
--print-armap out2.lib | FileCheck
--check-prefix
=IMPLIB
%s
86 .globl "#mangled_func"
92 .globl "#exportas_func"
98 .globl "?cxx_func@@$$hYAHXZ"
100 "?cxx_func@@$$hYAHXZ":
105 .globl "#mangled_data_sym"
115 .section .drectve, "yn"
116 .ascii " -export:unmangled_func"
117 .ascii " -export:#mangled_func"
118 .ascii " -export:#exportas_func,EXPORTAS,exportas_func"
119 .ascii " -export:?cxx_func@@$$hYAHXZ"
120 .ascii " -export:data_sym,DATA"
121 .ascii " -export:#mangled_data_sym,DATA"