2015-07-14 06:31:45 +08:00
|
|
|
# RUN: yaml2obj < %p/Inputs/hello32.yaml > %t.obj
|
2015-08-07 00:47:46 +08:00
|
|
|
# RUN: lld-link %t.obj %p/Inputs/std32.lib /subsystem:console \
|
2015-07-16 07:01:36 +08:00
|
|
|
# RUN: /entry:main@0 /alternatename:___delayLoadHelper2@8=_main@0 \
|
|
|
|
# RUN: /debug /delayload:std32.dll /out:%t.exe
|
2015-07-16 06:26:57 +08:00
|
|
|
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
|
|
|
|
# RUN: llvm-readobj -coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
|
2015-08-01 01:41:11 +08:00
|
|
|
# RUN: llvm-objdump -d %t.exe | FileCheck -check-prefix=DISASM %s
|
2015-07-14 06:31:45 +08:00
|
|
|
|
2015-07-16 07:01:36 +08:00
|
|
|
IMPORT: Format: COFF-i386
|
|
|
|
IMPORT-NEXT: Arch: i386
|
|
|
|
IMPORT-NEXT: AddressSize: 32bit
|
|
|
|
IMPORT-NEXT: DelayImport {
|
|
|
|
IMPORT-NEXT: Name: std32.dll
|
|
|
|
IMPORT-NEXT: Attributes: 0x1
|
|
|
|
IMPORT-NEXT: ModuleHandle: 0x1018
|
|
|
|
IMPORT-NEXT: ImportAddressTable: 0x1020
|
|
|
|
IMPORT-NEXT: ImportNameTable: 0x3040
|
|
|
|
IMPORT-NEXT: BoundDelayImportTable: 0x0
|
|
|
|
IMPORT-NEXT: UnloadDelayImportTable: 0x0
|
|
|
|
IMPORT-NEXT: Import {
|
|
|
|
IMPORT-NEXT: Symbol: ExitProcess (0)
|
2015-07-26 05:42:33 +08:00
|
|
|
IMPORT-NEXT: Address: 0x402029
|
2015-07-16 07:01:36 +08:00
|
|
|
IMPORT-NEXT: }
|
|
|
|
IMPORT-NEXT: Import {
|
|
|
|
IMPORT-NEXT: Symbol: MessageBoxA (0)
|
2015-07-28 10:54:18 +08:00
|
|
|
IMPORT-NEXT: Address: 0x40203E
|
2015-07-16 07:01:36 +08:00
|
|
|
IMPORT-NEXT: }
|
|
|
|
IMPORT-NEXT: }
|
2015-07-16 06:26:57 +08:00
|
|
|
|
|
|
|
BASEREL: BaseReloc [
|
|
|
|
BASEREL-NEXT: Entry {
|
2015-07-25 07:24:45 +08:00
|
|
|
BASEREL-NEXT: Type: HIGHLOW
|
2015-07-16 07:01:36 +08:00
|
|
|
BASEREL-NEXT: Address: 0x1020
|
|
|
|
BASEREL-NEXT: }
|
|
|
|
BASEREL-NEXT: Entry {
|
2015-07-25 07:24:45 +08:00
|
|
|
BASEREL-NEXT: Type: HIGHLOW
|
2015-07-28 10:54:18 +08:00
|
|
|
BASEREL-NEXT: Address: 0x1024
|
2015-07-16 07:01:36 +08:00
|
|
|
BASEREL-NEXT: }
|
|
|
|
BASEREL-NEXT: Entry {
|
2015-07-25 07:24:45 +08:00
|
|
|
BASEREL-NEXT: Type: HIGHLOW
|
2015-07-16 06:26:57 +08:00
|
|
|
BASEREL-NEXT: Address: 0x2005
|
|
|
|
BASEREL-NEXT: }
|
|
|
|
BASEREL-NEXT: Entry {
|
2015-07-25 07:24:45 +08:00
|
|
|
BASEREL-NEXT: Type: HIGHLOW
|
2015-07-16 06:26:57 +08:00
|
|
|
BASEREL-NEXT: Address: 0x200C
|
|
|
|
BASEREL-NEXT: }
|
|
|
|
BASEREL-NEXT: Entry {
|
2015-07-25 07:24:45 +08:00
|
|
|
BASEREL-NEXT: Type: HIGHLOW
|
2015-07-25 09:16:04 +08:00
|
|
|
BASEREL-NEXT: Address: 0x201F
|
2015-07-16 06:26:57 +08:00
|
|
|
BASEREL-NEXT: }
|
|
|
|
BASEREL-NEXT: Entry {
|
2015-07-25 07:24:45 +08:00
|
|
|
BASEREL-NEXT: Type: HIGHLOW
|
2015-07-25 09:16:04 +08:00
|
|
|
BASEREL-NEXT: Address: 0x2025
|
2015-07-16 06:26:57 +08:00
|
|
|
BASEREL-NEXT: }
|
2015-07-16 07:01:36 +08:00
|
|
|
BASEREL-NEXT: Entry {
|
2015-07-25 07:24:45 +08:00
|
|
|
BASEREL-NEXT: Type: HIGHLOW
|
2015-07-25 09:16:04 +08:00
|
|
|
BASEREL-NEXT: Address: 0x202C
|
2015-07-16 07:01:36 +08:00
|
|
|
BASEREL-NEXT: }
|
|
|
|
BASEREL-NEXT: Entry {
|
2015-07-25 07:24:45 +08:00
|
|
|
BASEREL-NEXT: Type: HIGHLOW
|
2015-07-25 09:16:04 +08:00
|
|
|
BASEREL-NEXT: Address: 0x2031
|
2015-07-16 07:01:36 +08:00
|
|
|
BASEREL-NEXT: }
|
|
|
|
BASEREL-NEXT: Entry {
|
2015-07-25 07:24:45 +08:00
|
|
|
BASEREL-NEXT: Type: HIGHLOW
|
2015-07-25 09:16:04 +08:00
|
|
|
BASEREL-NEXT: Address: 0x2041
|
2015-07-16 07:01:36 +08:00
|
|
|
BASEREL-NEXT: }
|
|
|
|
BASEREL-NEXT: Entry {
|
2015-07-25 07:24:45 +08:00
|
|
|
BASEREL-NEXT: Type: HIGHLOW
|
2015-07-25 09:16:04 +08:00
|
|
|
BASEREL-NEXT: Address: 0x2046
|
2015-07-16 07:01:36 +08:00
|
|
|
BASEREL-NEXT: }
|
2015-07-16 06:26:57 +08:00
|
|
|
BASEREL-NEXT: ]
|
2015-07-16 07:01:36 +08:00
|
|
|
|
2015-07-26 05:42:33 +08:00
|
|
|
DISASM: 202b: 68 20 10 40 00 pushl $4198432
|
|
|
|
DISASM-NEXT: 2030: 68 00 30 40 00 pushl $4206592
|
2015-07-25 09:16:04 +08:00
|
|
|
DISASM-NEXT: 2035: e8 c6 ff ff ff calll -58 <_main@0>
|
|
|
|
DISASM-NEXT: 203a: 5a popl %edx
|
|
|
|
DISASM-NEXT: 203b: 59 popl %ecx
|
|
|
|
DISASM-NEXT: 203c: ff e0 jmpl *%eax
|
|
|
|
DISASM-NEXT: 203e: 51 pushl %ecx
|
|
|
|
DISASM-NEXT: 203f: 52 pushl %edx
|
2015-07-28 10:54:18 +08:00
|
|
|
DISASM-NEXT: 2040: 68 24 10 40 00 pushl $4198436
|
2015-07-26 05:42:33 +08:00
|
|
|
DISASM-NEXT: 2045: 68 00 30 40 00 pushl $4206592
|
2015-07-25 09:16:04 +08:00
|
|
|
DISASM-NEXT: 204a: e8 b1 ff ff ff calll -79 <_main@0>
|
|
|
|
DISASM-NEXT: 204f: 5a popl %edx
|
|
|
|
DISASM-NEXT: 2050: 59 popl %ecx
|
|
|
|
DISASM-NEXT: 2051: ff e0 jmpl *%eax
|