1 # RUN: yaml2obj %p/Inputs/delayimporttables-dll1.yaml -o %t1.obj
2 # RUN: yaml2obj %p/Inputs/delayimporttables-dll2.yaml -o %t2.obj
3 # RUN: yaml2obj %s -o %t.obj
4 # RUN: lld-link /nodefaultlib /entry:DllMain /out:%T/delayimporttables-dll1.dll /dll /implib:%t-dll1.lib %t1.obj
5 # RUN: lld-link /nodefaultlib /entry:DllMain /out:%T/delayimporttables-dll2.dll /dll /implib:%t-dll2.lib %t2.obj
6 # RUN: lld-link /nodefaultlib /entry:main /out:%t.exe /delayload:delayimporttables-dll1.dll /delayload:delayimporttables-dll2.dll %t.obj %t-dll1.lib %t-dll2.lib
7 # RUN: llvm-readobj --coff-imports %t.exe |FileCheck %s
9 # CHECK: Format: COFF-x86-64
10 # CHECK-NEXT: Arch: x86_64
11 # CHECK-NEXT: AddressSize: 64bit
12 # CHECK-NEXT: DelayImport {
13 # CHECK-NEXT: Name: delayimporttables-dll1.dll
14 # CHECK-NEXT: Attributes: 0x1
15 # CHECK-NEXT: ModuleHandle: 0x3000
16 # CHECK-NEXT: ImportAddressTable: 0x3010
17 # CHECK-NEXT: ImportNameTable: 0x2070
18 # CHECK-NEXT: BoundDelayImportTable: 0x0
19 # CHECK-NEXT: UnloadDelayImportTable: 0x0
20 # CHECK-NEXT: Import {
21 # CHECK-NEXT: Symbol: one (0)
22 # CHECK-NEXT: Address: 0x14000104D
24 # CHECK-NEXT: Import {
25 # CHECK-NEXT: Symbol: two (0)
26 # CHECK-NEXT: Address: 0x140001059
29 # CHECK-NEXT: DelayImport {
30 # CHECK-NEXT: Name: delayimporttables-dll2.dll
31 # CHECK-NEXT: Attributes: 0x1
32 # CHECK-NEXT: ModuleHandle: 0x3008
33 # CHECK-NEXT: ImportAddressTable: 0x3028
34 # CHECK-NEXT: ImportNameTable: 0x2088
35 # CHECK-NEXT: BoundDelayImportTable: 0x0
36 # CHECK-NEXT: UnloadDelayImportTable: 0x0
37 # CHECK-NEXT: Import {
38 # CHECK-NEXT: Symbol: left (0)
39 # CHECK-NEXT: Address: 0x1400010B8
41 # CHECK-NEXT: Import {
42 # CHECK-NEXT: Symbol: right (0)
43 # CHECK-NEXT: Address: 0x1400010C4
49 Machine: IMAGE_FILE_MACHINE_AMD64
53 Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
55 SectionData: 2020202F44454641554C544C49423A224C4942434D5422202F44454641554C544C49423A224F4C444E414D45532220
57 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
59 SectionData: 4889542410894C24084883EC28FF1500000000FF1500000000FF1500000000FF150000000033C04883C428C3CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC488954241048894C240833C0C3
63 Type: IMAGE_REL_AMD64_REL32
66 Type: IMAGE_REL_AMD64_REL32
68 SymbolName: __imp_left
69 Type: IMAGE_REL_AMD64_REL32
71 SymbolName: __imp_right
72 Type: IMAGE_REL_AMD64_REL32
77 SimpleType: IMAGE_SYM_TYPE_NULL
78 ComplexType: IMAGE_SYM_DTYPE_NULL
79 StorageClass: IMAGE_SYM_CLASS_STATIC
82 NumberOfRelocations: 0
83 NumberOfLinenumbers: 0
89 SimpleType: IMAGE_SYM_TYPE_NULL
90 ComplexType: IMAGE_SYM_DTYPE_NULL
91 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
95 SimpleType: IMAGE_SYM_TYPE_NULL
96 ComplexType: IMAGE_SYM_DTYPE_NULL
97 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
101 SimpleType: IMAGE_SYM_TYPE_NULL
102 ComplexType: IMAGE_SYM_DTYPE_NULL
103 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
107 SimpleType: IMAGE_SYM_TYPE_NULL
108 ComplexType: IMAGE_SYM_DTYPE_NULL
109 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
113 SimpleType: IMAGE_SYM_TYPE_NULL
114 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
115 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
116 - Name: __delayLoadHelper2
119 SimpleType: IMAGE_SYM_TYPE_NULL
120 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
121 StorageClass: IMAGE_SYM_CLASS_EXTERNAL