2013-07-05 18:41:44 +08:00
|
|
|
# RUN: yaml2obj %p/Inputs/hello.obj.yaml > %t.obj
|
|
|
|
|
2013-12-27 16:37:40 +08:00
|
|
|
# RUN: lld -flavor link /out:%t1.exe /subsystem:console /force -- %t.obj
|
|
|
|
# RUN: llvm-readobj -file-headers %t1.exe | FileCheck -check-prefix=FILE %s
|
2013-06-14 10:30:34 +08:00
|
|
|
|
2013-07-01 16:06:48 +08:00
|
|
|
FILE: ImageOptionalHeader {
|
2014-08-01 06:40:35 +08:00
|
|
|
FILE: SizeOfInitializedData: 1024
|
2013-09-24 02:08:51 +08:00
|
|
|
FILE: SizeOfHeaders: 512
|
2013-07-01 16:06:48 +08:00
|
|
|
FILE: }
|
|
|
|
|
2013-12-27 16:37:40 +08:00
|
|
|
# RUN: lld -flavor link /out:%t2.exe /subsystem:console /force -- %t.obj
|
|
|
|
# RUN: llvm-readobj -sections %t2.exe | FileCheck -check-prefix=SECTIONS %s
|
2013-07-01 16:06:48 +08:00
|
|
|
|
2013-11-27 08:55:45 +08:00
|
|
|
SECTIONS: Format: COFF-i386
|
|
|
|
SECTIONS-NEXT: Arch: i386
|
|
|
|
SECTIONS-NEXT: AddressSize: 32bit
|
|
|
|
SECTIONS-NEXT: Sections [
|
|
|
|
SECTIONS-NEXT: Section {
|
|
|
|
SECTIONS-NEXT: Number: 1
|
|
|
|
SECTIONS-NEXT: Name: .data
|
|
|
|
SECTIONS-NEXT: VirtualSize: 0x12
|
|
|
|
SECTIONS-NEXT: VirtualAddress: 0x1000
|
2014-08-01 06:40:35 +08:00
|
|
|
SECTIONS-NEXT: RawDataSize: 512
|
2013-11-27 08:55:45 +08:00
|
|
|
SECTIONS-NEXT: PointerToRawData: 0x200
|
|
|
|
SECTIONS-NEXT: PointerToRelocations: 0x0
|
|
|
|
SECTIONS-NEXT: PointerToLineNumbers: 0x0
|
|
|
|
SECTIONS-NEXT: RelocationCount: 0
|
|
|
|
SECTIONS-NEXT: LineNumberCount: 0
|
|
|
|
SECTIONS-NEXT: Characteristics [
|
|
|
|
SECTIONS-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
|
|
|
|
SECTIONS-NEXT: IMAGE_SCN_MEM_READ
|
|
|
|
SECTIONS-NEXT: IMAGE_SCN_MEM_WRITE
|
|
|
|
SECTIONS-NEXT: ]
|
|
|
|
SECTIONS-NEXT: }
|
|
|
|
SECTIONS-NEXT: Section {
|
|
|
|
SECTIONS-NEXT: Number: 2
|
|
|
|
SECTIONS-NEXT: Name: .text (2E 74 65 78 74 00 00 00)
|
|
|
|
SECTIONS-NEXT: VirtualSize: 0x1C
|
|
|
|
SECTIONS-NEXT: VirtualAddress: 0x2000
|
2014-08-01 06:40:35 +08:00
|
|
|
SECTIONS-NEXT: RawDataSize: 512
|
2013-11-27 08:55:45 +08:00
|
|
|
SECTIONS-NEXT: PointerToRawData: 0x400
|
|
|
|
SECTIONS-NEXT: PointerToRelocations: 0x0
|
|
|
|
SECTIONS-NEXT: PointerToLineNumbers: 0x0
|
|
|
|
SECTIONS-NEXT: RelocationCount: 0
|
|
|
|
SECTIONS-NEXT: LineNumberCount: 0
|
|
|
|
SECTIONS-NEXT: Characteristics [
|
|
|
|
SECTIONS-NEXT: IMAGE_SCN_CNT_CODE
|
|
|
|
SECTIONS-NEXT: IMAGE_SCN_MEM_EXECUTE
|
|
|
|
SECTIONS-NEXT: IMAGE_SCN_MEM_READ
|
|
|
|
SECTIONS-NEXT: ]
|
|
|
|
SECTIONS-NEXT: }
|