2013-06-13 06:19:05 +08:00
|
|
|
# Checks functionality of PECOFF writer. "nop.obj" is an object that has only
|
|
|
|
# text section. Other data, including data sections, relocations, symbol
|
|
|
|
# tables are not present in nop.obj.
|
|
|
|
#
|
2013-07-05 18:41:44 +08:00
|
|
|
# RUN: yaml2obj %p/Inputs/nop.obj.yaml > %t.obj
|
|
|
|
#
|
2013-09-12 13:09:01 +08:00
|
|
|
# RUN: lld -flavor link /out:%t1 /subsystem:console,3.11 /entry:start \
|
2013-08-27 11:38:18 +08:00
|
|
|
# RUN: /opt:noref -- %t.obj && llvm-readobj -file-headers %t1 \
|
2013-08-27 11:18:11 +08:00
|
|
|
# RUN: | FileCheck -check-prefix=FILE %s
|
2013-07-05 18:41:44 +08:00
|
|
|
#
|
2013-09-12 13:09:01 +08:00
|
|
|
# RUN: lld -flavor link /out:%t1 /entry:start /opt:noref -- %t.obj \
|
2013-07-05 18:41:44 +08:00
|
|
|
# RUN: && llvm-readobj -sections %t1 | FileCheck -check-prefix=SECTIONS %s
|
2013-05-29 02:13:31 +08:00
|
|
|
|
2013-06-07 09:31:51 +08:00
|
|
|
FILE: Format: COFF-i386
|
|
|
|
FILE: Arch: i386
|
|
|
|
FILE: AddressSize: 32bit
|
|
|
|
FILE: ImageFileHeader {
|
|
|
|
FILE: Machine: IMAGE_FILE_MACHINE_I386 (0x14C)
|
2013-07-01 15:32:12 +08:00
|
|
|
FILE: SectionCount: 1
|
2013-06-07 09:31:51 +08:00
|
|
|
FILE: TimeDateStamp:
|
|
|
|
FILE: PointerToSymbolTable: 0x0
|
|
|
|
FILE: SymbolCount: 0
|
|
|
|
FILE: OptionalHeaderSize: 224
|
2013-07-16 02:43:01 +08:00
|
|
|
FILE: Characteristics [ (0x102)
|
2013-06-07 09:31:51 +08:00
|
|
|
FILE: IMAGE_FILE_32BIT_MACHINE (0x100)
|
|
|
|
FILE: IMAGE_FILE_EXECUTABLE_IMAGE (0x2)
|
|
|
|
FILE: ]
|
|
|
|
FILE: }
|
2013-06-13 03:13:27 +08:00
|
|
|
FILE: ImageOptionalHeader {
|
|
|
|
FILE: MajorLinkerVersion: 0
|
|
|
|
FILE: MinorLinkerVersion: 0
|
|
|
|
FILE: SizeOfCode: 512
|
|
|
|
FILE: SizeOfInitializedData: 0
|
|
|
|
FILE: SizeOfUninitializedData: 0
|
|
|
|
FILE: AddressOfEntryPoint: 0x1000
|
|
|
|
FILE: BaseOfCode: 0x1000
|
2013-07-11 13:43:38 +08:00
|
|
|
FILE: BaseOfData: 0
|
2013-06-13 03:13:27 +08:00
|
|
|
FILE: ImageBase: 0x400000
|
|
|
|
FILE: SectionAlignment: 4096
|
|
|
|
FILE: FileAlignment: 512
|
|
|
|
FILE: MajorOperatingSystemVersion: 3
|
|
|
|
FILE: MinorOperatingSystemVersion: 11
|
|
|
|
FILE: MajorImageVersion: 0
|
|
|
|
FILE: MinorImageVersion: 0
|
|
|
|
FILE: MajorSubsystemVersion: 3
|
|
|
|
FILE: MinorSubsystemVersion: 11
|
2013-07-03 20:55:56 +08:00
|
|
|
FILE: SizeOfImage: 8192
|
2013-06-13 03:13:27 +08:00
|
|
|
FILE: SizeOfHeaders: 512
|
|
|
|
FILE: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI (0x3)
|
2013-06-28 05:03:44 +08:00
|
|
|
FILE: Subsystem [ (0x8540)
|
2013-06-13 03:13:27 +08:00
|
|
|
FILE: IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE (0x40)
|
2013-06-28 05:03:44 +08:00
|
|
|
FILE: IMAGE_DLL_CHARACTERISTICS_NO_SEH (0x400)
|
2013-06-13 03:13:27 +08:00
|
|
|
FILE: IMAGE_DLL_CHARACTERISTICS_NX_COMPAT (0x100)
|
|
|
|
FILE: IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE (0x8000)
|
|
|
|
FILE: ]
|
|
|
|
FILE: SizeOfStackReserve: 1048576
|
|
|
|
FILE: SizeOfStackCommit: 4096
|
|
|
|
FILE: SizeOfHeapReserve: 1048576
|
|
|
|
FILE: SizeOfHeapCommit: 4096
|
|
|
|
FILE: NumberOfRvaAndSize: 16
|
|
|
|
FILE: }
|
2013-06-07 09:31:51 +08:00
|
|
|
|
|
|
|
SECTIONS: Format: COFF-i386
|
|
|
|
SECTIONS: Arch: i386
|
|
|
|
SECTIONS: AddressSize: 32bit
|
|
|
|
SECTIONS: Sections [
|
|
|
|
SECTIONS: Section {
|
|
|
|
SECTIONS: Number: 1
|
|
|
|
SECTIONS: Name: .text (2E 74 65 78 74 00 00 00)
|
|
|
|
SECTIONS: VirtualSize: 0x6
|
|
|
|
SECTIONS: VirtualAddress: 0x1000
|
2013-06-29 04:10:36 +08:00
|
|
|
SECTIONS: RawDataSize: 512
|
2013-06-07 09:31:51 +08:00
|
|
|
SECTIONS: PointerToRawData: 0x200
|
|
|
|
SECTIONS: PointerToRelocations: 0x0
|
|
|
|
SECTIONS: PointerToLineNumbers: 0x0
|
|
|
|
SECTIONS: RelocationCount: 0
|
|
|
|
SECTIONS: LineNumberCount: 0
|
|
|
|
SECTIONS: Characteristics [ (0x60000020)
|
|
|
|
SECTIONS: IMAGE_SCN_CNT_CODE (0x20)
|
|
|
|
SECTIONS: IMAGE_SCN_MEM_EXECUTE (0x20000000)
|
|
|
|
SECTIONS: IMAGE_SCN_MEM_READ (0x40000000)
|
|
|
|
SECTIONS: ]
|
|
|
|
SECTIONS: }
|
|
|
|
SECTIONS: ]
|