hanchenye-llvm-project/lld/test/pecoff/hello.test

52 lines
1.8 KiB
Plaintext

# RUN: yaml2obj %p/Inputs/hello.obj.yaml > %t.obj
# RUN: lld -flavor link /out:%t1.exe /subsystem:console /force -- %t.obj
# RUN: llvm-readobj -file-headers %t1.exe | FileCheck -check-prefix=FILE %s
FILE: ImageOptionalHeader {
FILE: SizeOfInitializedData: 1024
FILE: SizeOfHeaders: 512
FILE: }
# RUN: lld -flavor link /out:%t2.exe /subsystem:console /force -- %t.obj
# RUN: llvm-readobj -sections %t2.exe | FileCheck -check-prefix=SECTIONS %s
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
SECTIONS-NEXT: RawDataSize: 512
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
SECTIONS-NEXT: RawDataSize: 512
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: }