2 # RUN: yaml2obj %p/Inputs/hello32.yaml -o %t.obj
3 # RUN: lld-link -safeseh:no %t.obj %p/Inputs/std32.lib /subsystem:console \
4 # RUN: /entry:main@0 /alternatename:___delayLoadHelper2@8=_main@0 \
5 # RUN: /delayload:std32.dll /out:%t.exe
6 # RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
7 # RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
8 # RUN: llvm-objdump --no-print-imm-hex -d %t.exe | FileCheck --check-prefix=DISASM %s
10 IMPORT: Format: COFF-i386
11 IMPORT-NEXT: Arch: i386
12 IMPORT-NEXT: AddressSize: 32bit
13 IMPORT-NEXT: DelayImport {
14 IMPORT-NEXT: Name: std32.dll
15 IMPORT-NEXT: Attributes: 0x1
16 IMPORT-NEXT: ModuleHandle: 0x3018
17 IMPORT-NEXT: ImportAddressTable: 0x3020
18 IMPORT-NEXT: ImportNameTable: 0x2040
19 IMPORT-NEXT: BoundDelayImportTable: 0x0
20 IMPORT-NEXT: UnloadDelayImportTable: 0x0
22 IMPORT-NEXT: Symbol: ExitProcess (0)
23 IMPORT-NEXT: Address: 0x401029
26 IMPORT-NEXT: Symbol: MessageBoxA (0)
27 IMPORT-NEXT: Address: 0x401033
33 BASEREL-NEXT: Type: HIGHLOW
34 BASEREL-NEXT: Address: 0x1005
37 BASEREL-NEXT: Type: HIGHLOW
38 BASEREL-NEXT: Address: 0x100C
41 BASEREL-NEXT: Type: HIGHLOW
42 BASEREL-NEXT: Address: 0x101F
45 BASEREL-NEXT: Type: HIGHLOW
46 BASEREL-NEXT: Address: 0x1025
49 BASEREL-NEXT: Type: HIGHLOW
50 BASEREL-NEXT: Address: 0x102A
53 BASEREL-NEXT: Type: HIGHLOW
54 BASEREL-NEXT: Address: 0x1034
57 BASEREL-NEXT: Type: HIGHLOW
58 BASEREL-NEXT: Address: 0x1041
61 BASEREL-NEXT: Type: ABSOLUTE
62 BASEREL-NEXT: Address: 0x1000
65 BASEREL-NEXT: Type: HIGHLOW
66 BASEREL-NEXT: Address: 0x3020
69 BASEREL-NEXT: Type: HIGHLOW
70 BASEREL-NEXT: Address: 0x3024
74 DISASM: 1029: b8 20 30 40 00 movl $4206624, %eax
75 DISASM-NEXT: 102e: e9 0a 00 00 00 jmp 0x40103d <.text+0x3d>
76 DISASM-NEXT: 1033: b8 24 30 40 00 movl $4206628, %eax
77 DISASM-NEXT: 1038: e9 00 00 00 00 jmp 0x40103d <.text+0x3d>
78 DISASM-NEXT: 103d: 51 pushl %ecx
79 DISASM-NEXT: 103e: 52 pushl %edx
80 DISASM-NEXT: 103f: 50 pushl %eax
81 DISASM-NEXT: 1040: 68 00 20 40 00 pushl $4202496
82 DISASM-NEXT: 1045: e8 b6 ff ff ff calll 0x401000 <.text>
83 DISASM-NEXT: 104a: 5a popl %edx
84 DISASM-NEXT: 104b: 59 popl %ecx
85 DISASM-NEXT: 104c: ff e0 jmpl *%eax