[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / COFF / dll.test
blob3bb328d0cacc338cd2288738f1e4706026a1bad6
1 # REQUIRES: x86
2 # RUN: yaml2obj %p/Inputs/export.yaml -o %t.obj
3 # RUN: lld-link /out:%t.dll /dll %t.obj /export:exportfn1 /export:exportfn2 \
4 # RUN:   /export:mangled
5 # RUN: llvm-objdump -p %t.dll | FileCheck --check-prefix=EXPORT %s
7 EXPORT:      Export Table:
8 EXPORT:      DLL name: dll.test.tmp.dll
9 EXPORT:      Ordinal      RVA  Name
10 EXPORT-NEXT:       1   0x1008  exportfn1
11 EXPORT-NEXT:       2   0x1010  exportfn2
12 EXPORT-NEXT:       3   0x1010  exportfn3
13 EXPORT-NEXT:       4   0x1010  mangled
15 # RUN: yaml2obj %p/Inputs/export2.yaml -o %t4.obj
16 # RUN: rm -f %t4.lib
17 # RUN: llvm-ar cru %t4.lib %t4.obj
18 # RUN: lld-link /out:%t5.dll /dll %t.obj %t4.lib /export:mangled2
19 # RUN: llvm-objdump -p %t5.dll | FileCheck --check-prefix=EXPORT2 %s
21 EXPORT2:      Export Table:
22 EXPORT2:      DLL name: dll.test.tmp5.dll
23 EXPORT2:      Ordinal      RVA  Name
24 EXPORT2-NEXT:       1   0x1010  exportfn3
25 EXPORT2-NEXT:       2   0x101c  mangled2
27 # RUN: llvm-as -o %t.lto.obj %p/Inputs/export.ll
28 # RUN: lld-link -opt:noicf /out:%t.lto.dll /dll %t.lto.obj /export:exportfn1 /export:exportfn2
29 # RUN: llvm-objdump -p %t.lto.dll | FileCheck --check-prefix=EXPORT-LTO %s
31 EXPORT-LTO:      Export Table:
32 EXPORT-LTO:      DLL name: dll.test.tmp.lto.dll
33 EXPORT-LTO:      Ordinal      RVA  Name
34 EXPORT-LTO-NEXT:       1   0x1010  exportfn1
35 EXPORT-LTO-NEXT:       2   0x1020  exportfn2
36 EXPORT-LTO-NEXT:       3   0x1030  exportfn3
38 # RUN: lld-link /out:%t.dll /dll %t.obj /implib:%t2.lib \
39 # RUN:   /export:exportfn1 /export:exportfn2
40 # RUN: yaml2obj %p/Inputs/import.yaml -o %t2.obj
41 # RUN: lld-link /out:%t2.exe /entry:main %t2.obj %t2.lib
42 # RUN: llvm-readobj --coff-imports %t2.exe | FileCheck -check-prefix=IMPORT %s
44 # RUN: lld-link /out:%t2.lto.exe /entry:main %t2.obj %t.lto.lib
45 # RUN: llvm-readobj --coff-imports %t2.lto.exe | FileCheck -check-prefix=IMPORT %s
47 IMPORT: Symbol: exportfn1
48 IMPORT: Symbol: exportfn2