2015-06-18 04:40:43 +08:00
|
|
|
# REQUIRES: winres
|
|
|
|
|
|
|
|
# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj
|
2015-06-29 06:16:41 +08:00
|
|
|
# RUN: lld -flavor link2 /out:%t.dll /dll %t.obj /export:exportfn1 /export:exportfn2 \
|
|
|
|
# RUN: /export:mangled
|
2015-06-18 04:40:43 +08:00
|
|
|
# RUN: llvm-objdump -p %t.dll | FileCheck -check-prefix=EXPORT %s
|
|
|
|
|
|
|
|
EXPORT: Export Table:
|
|
|
|
EXPORT: DLL name: dll.test.tmp.dll
|
|
|
|
EXPORT: Ordinal RVA Name
|
|
|
|
EXPORT-NEXT: 0 0
|
|
|
|
EXPORT-NEXT: 1 0x1008 exportfn1
|
|
|
|
EXPORT-NEXT: 2 0x1010 exportfn2
|
2015-06-18 13:22:15 +08:00
|
|
|
EXPORT-NEXT: 3 0x1010 exportfn3
|
2015-06-29 06:16:41 +08:00
|
|
|
EXPORT-NEXT: 4 0x1010 mangled
|
2015-06-18 13:22:15 +08:00
|
|
|
|
|
|
|
# RUN: llvm-as -o %t.lto.obj %p/Inputs/export.ll
|
|
|
|
# RUN: lld -flavor link2 /out:%t.lto.dll /dll %t.lto.obj /export:exportfn1 /export:exportfn2
|
|
|
|
# RUN: llvm-objdump -p %t.lto.dll | FileCheck -check-prefix=EXPORT-LTO %s
|
|
|
|
|
|
|
|
EXPORT-LTO: Export Table:
|
|
|
|
EXPORT-LTO: DLL name: dll.test.tmp.lto.dll
|
|
|
|
EXPORT-LTO: Ordinal RVA Name
|
|
|
|
EXPORT-LTO-NEXT: 0 0
|
|
|
|
EXPORT-LTO-NEXT: 1 0x1010 exportfn1
|
|
|
|
EXPORT-LTO-NEXT: 2 0x1020 exportfn2
|
|
|
|
EXPORT-LTO-NEXT: 3 0x1030 exportfn3
|
2015-06-18 04:40:43 +08:00
|
|
|
|
|
|
|
# RUN: yaml2obj < %p/Inputs/import.yaml > %t2.obj
|
|
|
|
# RUN: lld -flavor link2 /out:%t2.exe %t2.obj %t.lib
|
|
|
|
# RUN: llvm-readobj -coff-imports %t2.exe | FileCheck -check-prefix=IMPORT %s
|
|
|
|
|
2015-06-29 06:16:41 +08:00
|
|
|
# RUN: lld -flavor link2 /out:%t.dll /dll %t.obj /implib:%t2.lib \
|
|
|
|
# RUN: /export:exportfn1 /export:exportfn2
|
2015-06-19 04:27:09 +08:00
|
|
|
# RUN: lld -flavor link2 /out:%t2.exe %t2.obj %t2.lib
|
|
|
|
# RUN: llvm-readobj -coff-imports %t2.exe | FileCheck -check-prefix=IMPORT %s
|
|
|
|
|
2015-06-18 13:22:15 +08:00
|
|
|
# RUN: lld -flavor link2 /out:%t2.lto.exe %t2.obj %t.lto.lib
|
|
|
|
# RUN: llvm-readobj -coff-imports %t2.lto.exe | FileCheck -check-prefix=IMPORT %s
|
|
|
|
|
2015-06-18 04:40:43 +08:00
|
|
|
IMPORT: Symbol: exportfn1
|
|
|
|
IMPORT: Symbol: exportfn2
|