llvm-project/lld/test/COFF/dllorder.test

66 lines
2.0 KiB
Plaintext
Raw Normal View History

# REQUIRES: winlib
# RUN: yaml2obj < %s > %t.obj
# RUN: mkdir -p %tlib
# RUN: rm -f %tlib/lib1.lib
# RUN: rm -f %tlib/lib2.lib
# RUN: echo EXPORTS sym1 > %t1.def
# RUN: echo EXPORTS sym2 > %t2.def
# RUN: lib /nologo /machine:amd64 /def:%t1.def /out:%tlib\lib1.lib
# RUN: lib /nologo /machine:amd64 /def:%t2.def /out:%tlib\lib2.lib
# RUN: lld-link /out:%t1.exe /entry:main /libpath:%tlib %t.obj /defaultlib:lib1 /defaultlib:lib2
# RUN: lld-link /out:%t2.exe /entry:main /libpath:%tlib %t.obj /defaultlib:lib2 /defaultlib:lib1
# RUN: llvm-readobj -coff-imports %t1.exe | FileCheck -check-prefix=CHECK1 %s
# RUN: llvm-readobj -coff-imports %t2.exe | FileCheck -check-prefix=CHECK2 %s
# CHECK1: Name: dllorder.test.tmp1.dll
# CHECK1: Name: dllorder.test.tmp2.dll
# CHECK2: Name: dllorder.test.tmp2.dll
# CHECK2: Name: dllorder.test.tmp1.dll
---
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []
sections:
- Name: .text
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 4096
SectionData: 0000000000000000
symbols:
- Name: .text
Value: 0
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 8
NumberOfRelocations: 0
NumberOfLinenumbers: 0
CheckSum: 0
Number: 0
- Name: main
Value: 0
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
- Name: __imp_sym1
Value: 0
SectionNumber: 0
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
- Name: __imp_sym2
Value: 0
SectionNumber: 0
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
...