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