summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-dlltool/arm64ec.test
blob: b03b4eaf7b2d0e0ed92dbaf37665c8c078b422a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Test creating ARM64EC importlib.

RUN: split-file %s %t.dir && cd %t.dir

RUN: llvm-dlltool -m arm64ec -d test.def -l test.lib
RUN: llvm-nm --print-armap test.lib | FileCheck --check-prefix=ARMAP %s

ARMAP:      Archive map
ARMAP-NEXT: __IMPORT_DESCRIPTOR_test in test.dll
ARMAP-NEXT: __NULL_IMPORT_DESCRIPTOR in test.dll
ARMAP-NEXT: test_NULL_THUNK_DATA in test.dll
ARMAP-EMPTY:
ARMAP-NEXT: Archive EC map
ARMAP-NEXT: #func in test.dll
ARMAP-NEXT: __IMPORT_DESCRIPTOR_test in test.dll
ARMAP-NEXT: __NULL_IMPORT_DESCRIPTOR in test.dll
ARMAP-NEXT: __imp_aux_func in test.dll
ARMAP-NEXT: __imp_func in test.dll
ARMAP-NEXT: func in test.dll
ARMAP-NEXT: test_NULL_THUNK_DATA in test.dll

RUN: llvm-dlltool -m arm64ec -d test.def -N test2.def -l test2.lib
RUN: llvm-nm --print-armap test2.lib | FileCheck --check-prefix=ARMAP2 %s

ARMAP2:      Archive map
ARMAP2-NEXT: __IMPORT_DESCRIPTOR_test in test.dll
ARMAP2-NEXT: __NULL_IMPORT_DESCRIPTOR in test.dll
ARMAP2-NEXT: __imp_otherfunc in test.dll
ARMAP2-NEXT: otherfunc in test.dll
ARMAP2-NEXT: test_NULL_THUNK_DATA in test.dll
ARMAP2-EMPTY:
ARMAP2-NEXT: Archive EC map
ARMAP2-NEXT: #func in test.dll
ARMAP2-NEXT: __IMPORT_DESCRIPTOR_test in test.dll
ARMAP2-NEXT: __NULL_IMPORT_DESCRIPTOR in test.dll
ARMAP2-NEXT: __imp_aux_func in test.dll
ARMAP2-NEXT: __imp_func in test.dll
ARMAP2-NEXT: func in test.dll
ARMAP2-NEXT: test_NULL_THUNK_DATA in test.dll

RUN: llvm-dlltool -m arm64ec -d test.def --input-native-def test2.def -l test3.lib
RUN: llvm-nm --print-armap test3.lib | FileCheck --check-prefix=ARMAP2 %s

RUN: not llvm-dlltool -m arm64 -d test.def -N test2.def -l test4.lib 2>&1 | FileCheck --check-prefix=ERR %s
ERR: native .def file is supported only on arm64ec target

#--- test.def
LIBRARY test.dll
EXPORTS
    func

#--- test2.def
LIBRARY test.dll
EXPORTS
    otherfunc