forked from OSchip/llvm-project
91 lines
3.3 KiB
Plaintext
91 lines
3.3 KiB
Plaintext
# RUN: yaml2obj %p/Inputs/export.obj.yaml > %t.obj
|
|
#
|
|
# RUN: lld -flavor link /out:%t1.dll /dll /entry:init \
|
|
# RUN: /export:exportfn1 /export:exportfn2 -- %t.obj
|
|
# RUN: llvm-objdump -p %t1.dll | FileCheck -check-prefix=CHECK1 %s
|
|
|
|
CHECK1: Export Table:
|
|
CHECK1: DLL name: export.test.tmp1.dll
|
|
CHECK1: Ordinal RVA Name
|
|
CHECK1-NEXT: 1 0x2008 exportfn1
|
|
CHECK1-NEXT: 2 0x2010 exportfn2
|
|
|
|
# RUN: lld -flavor link /out:%t2.dll /dll /subsystem:console /entry:init \
|
|
# RUN: /export:exportfn1,@5 /export:exportfn2 -- %t.obj
|
|
# RUN: llvm-objdump -p %t2.dll | FileCheck -check-prefix=CHECK2 %s
|
|
|
|
CHECK2: Export Table:
|
|
CHECK2: DLL name: export.test.tmp2.dll
|
|
CHECK2: Ordinal RVA Name
|
|
CHECK2-NEXT: 5 0x2008 exportfn1
|
|
CHECK2-NEXT: 6 0x2010 exportfn2
|
|
|
|
# RUN: lld -flavor link /out:%t3.dll /dll /subsystem:console /entry:init \
|
|
# RUN: /export:exportfn1,@5,noname /export:exportfn2 -- %t.obj
|
|
# RUN: llvm-objdump -p %t3.dll | FileCheck -check-prefix=CHECK3 %s
|
|
|
|
CHECK3: Export Table:
|
|
CHECK3: DLL name: export.test.tmp3.dll
|
|
CHECK3: Ordinal RVA Name
|
|
CHECK3-NEXT: 5 0x2008
|
|
CHECK3-NEXT: 6 0x2010 exportfn2
|
|
|
|
# RUN: lld -flavor link /out:%t4.dll /dll /entry:init \
|
|
# RUN: /def:%p/Inputs/exports.def -- %t.obj
|
|
# RUN: llvm-objdump -p %t4.dll | FileCheck -check-prefix=CHECK4 %s
|
|
|
|
CHECK4: Export Table:
|
|
CHECK4: DLL name: export.test.tmp4.dll
|
|
CHECK4: Ordinal RVA Name
|
|
CHECK4-NEXT: 5 0x2008 exportfn1
|
|
CHECK4-NEXT: 6 0x2010 exportfn2
|
|
CHECK4-NEXT: 7 0x2010 exportfn3@256
|
|
CHECK4-NEXT: 8 0x2010 exportfn5
|
|
|
|
# RUN: lld -flavor link /out:%t5.dll /dll /entry:init \
|
|
# RUN: /export:exportfn7 -- %t.obj
|
|
# RUN: llvm-objdump -p %t5.dll | FileCheck -check-prefix=CHECK5 %s
|
|
|
|
CHECK5: Export Table:
|
|
CHECK5: DLL name: export.test.tmp5.dll
|
|
CHECK5: Ordinal RVA Name
|
|
CHECK5-NEXT: 1 0x2010 exportfn3@256
|
|
CHECK5-NEXT: 2 0x2010 exportfn7
|
|
|
|
# RUN: lld -flavor link /out:%t6.dll /dll /entry:init \
|
|
# RUN: /export:exportfn8 -- %t.obj
|
|
# RUN: llvm-objdump -p %t6.dll | FileCheck -check-prefix=CHECK6 %s
|
|
|
|
CHECK6: Export Table:
|
|
CHECK6: DLL name: export.test.tmp6.dll
|
|
CHECK6: Ordinal RVA Name
|
|
CHECK6-NEXT: 1 0x2010 exportfn3@256
|
|
CHECK6-NEXT: 2 0x2010 exportfn8
|
|
|
|
# RUN: lld -flavor link /out:%t7.dll /dll /entry:init \
|
|
# RUN: /export:exportfn7 /export:exportfn7@8 \
|
|
# RUN: /export:exportfn8 /export:exportfn8 /export:exportfn3 -- %t.obj
|
|
# RUN: llvm-objdump -p %t7.dll | FileCheck -check-prefix=DUP %s
|
|
|
|
DUP: Export Table:
|
|
DUP: DLL name: export.test.tmp7.dll
|
|
DUP: Ordinal RVA Name
|
|
DUP-NEXT: 1 0x2010 exportfn3
|
|
DUP-NEXT: 2 0x2010 exportfn7
|
|
DUP-NEXT: 3 0x2010 exportfn8
|
|
DUP-NOT: ?exportfn8@@YAXXZ
|
|
DUP-NOT: exportfn3@256
|
|
|
|
# RUN: yaml2obj %p/Inputs/export.obj.yaml > %t.obj
|
|
#
|
|
# RUN: lld -flavor link /out:%t8.dll /dll /entry:init \
|
|
# RUN: /export:f1=exportfn1 /export:f2@4=exportfn2,private -- %t.obj
|
|
# RUN: llvm-objdump -p %t8.dll | FileCheck -check-prefix=EQUAL %s
|
|
|
|
EQUAL: Export Table:
|
|
EQUAL: DLL name: export.test.tmp8.dll
|
|
EQUAL: Ordinal RVA Name
|
|
EQUAL-NEXT: 1 0x2010 exportfn3@256
|
|
EQUAL-NEXT: 2 0x2008 f1
|
|
EQUAL-NEXT: 3 0x2010 f2{{$}}
|