1RUN: llvm-readobj --coff-imports %p/Inputs/imports.exe.coff-i386 | FileCheck -check-prefix=X86 %s
2RUN: llvm-readobj --coff-imports %p/Inputs/imports.exe.coff-x86-64 | FileCheck -check-prefix=X64  %s
3
4X86:      Import {
5X86-NEXT:   Name: KERNEL32.dll
6X86-NEXT:   ImportLookupTableRVA: 0x2108
7X86-NEXT:   ImportAddressTableRVA: 0x2000
8X86-NEXT:   Symbol: ExitProcess (337)
9X86-NEXT:   Symbol: GetProcAddress (669)
10X86-NEXT:   Symbol: FreeLibrary (414)
11X86-NEXT:   Symbol: GetLastError (592)
12X86-NEXT:   Symbol: RaiseException (1087)
13X86-NEXT:   Symbol: LoadLibraryExA (934)
14X86-NEXT: }
15X86-NEXT: Import {
16X86-NEXT:   Name: USER32.dll
17X86-NEXT:   ImportLookupTableRVA: 0x2124
18X86-NEXT:   ImportAddressTableRVA: 0x201C
19X86-NEXT:   Symbol: MessageBoxA (582)
20X86-NEXT: }
21X86-NEXT: Import {
22X86-NEXT:   Name: mydll.dll
23X86-NEXT:   ImportLookupTableRVA: 0x212C
24X86-NEXT:   ImportAddressTableRVA: 0x2024
25X86-NEXT:   Symbol: Func1 (0)
26X86-NEXT:   Symbol: Func2 (1)
27X86-NEXT:   Symbol:  (3)
28X86-NEXT: }
29X86-NEXT: DelayImport {
30X86-NEXT:   Name: lazyload.dll
31X86-NEXT:   Attributes: 0x1
32X86-NEXT:   ModuleHandle: 0x301C
33X86-NEXT:   ImportAddressTable: 0x3010
34X86-NEXT:   ImportNameTable: 0x2090
35X86-NEXT:   BoundDelayImportTable: 0x20AC
36X86-NEXT:   UnloadDelayImportTable: 0x0
37X86-NEXT:   Import {
38X86-NEXT:     Symbol: Func5 (0)
39X86-NEXT:     Address: 0x401073
40X86-NEXT:   }
41X86-NEXT:   Import {
42X86-NEXT:     Symbol: Func4 (0)
43X86-NEXT:     Address: 0x401052
44X86-NEXT:   }
45X86-NEXT: }
46
47X64:      Import {
48X64-NEXT:   Name: KERNEL32.dll
49X64-NEXT:   ImportLookupTableRVA: 0x2170
50X64-NEXT:   ImportAddressTableRVA: 0x2000
51X64-NEXT:   Symbol: ExitProcess (343)
52X64-NEXT:   Symbol: GetProcAddress (676)
53X64-NEXT:   Symbol: FreeLibrary (420)
54X64-NEXT:   Symbol: GetLastError (598)
55X64-NEXT:   Symbol: RaiseException (1091)
56X64-NEXT:   Symbol: LoadLibraryExA (937)
57X64-NEXT: }
58X64-NEXT: Import {
59X64-NEXT:   Name: USER32.dll
60X64-NEXT:   ImportLookupTableRVA: 0x21A8
61X64-NEXT:   ImportAddressTableRVA: 0x2038
62X64-NEXT:   Symbol: MessageBoxA (586)
63X64-NEXT: }
64X64-NEXT: Import {
65X64-NEXT:   Name: mydll.dll
66X64-NEXT:   ImportLookupTableRVA: 0x21B8
67X64-NEXT:   ImportAddressTableRVA: 0x2048
68X64-NEXT:   Symbol: Func1 (0)
69X64-NEXT:   Symbol: Func2 (1)
70X64-NEXT:   Symbol:  (3)
71X64-NEXT: }
72X64-NEXT: DelayImport {
73X64-NEXT:   Name: lazyload.dll
74X64-NEXT:   Attributes: 0x1
75X64-NEXT:   ModuleHandle: 0x3028
76X64-NEXT:   ImportAddressTable: 0x3010
77X64-NEXT:   ImportNameTable: 0x20E0
78X64-NEXT:   BoundDelayImportTable: 0x2108
79X64-NEXT:   UnloadDelayImportTable: 0x0
80X64-NEXT:   Import {
81X64-NEXT:     Symbol: Func5 (0)
82X64-NEXT:     Address: 0x1400010F1
83X64-NEXT:   }
84X64-NEXT:   Import {
85X64-NEXT:     Symbol: Func4 (0)
86X64-NEXT:     Address: 0x140001066
87X64-NEXT:   }
88X64-NEXT: }
89