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

55 lines
1.8 KiB
Plaintext

# RUN: yaml2obj %p/Inputs/hello.obj.yaml > %t.obj
# RUN: lld -flavor link /out:%t1 /subsystem:console /force /opt:noref \
# RUN: -- %t.obj \
# RUN: && llvm-readobj -file-headers %t1 | FileCheck -check-prefix=FILE %s
FILE: ImageOptionalHeader {
FILE: SizeOfInitializedData: 1024
FILE: SizeOfHeaders: 512
FILE: }
# RUN: lld -flavor link /out:%t1 /subsystem:console /force /opt:noref \
# RUN: -- %t.obj \
# RUN: && llvm-readobj -sections %t1 | FileCheck -check-prefix=SECTIONS %s
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: 0x1C
SECTIONS: VirtualAddress: 0x1000
SECTIONS: RawDataSize: 512
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: Section {
SECTIONS: Number: 2
SECTIONS: Name: .data (2E 64 61 74 61 00 00 00)
SECTIONS: VirtualSize: 0x12
SECTIONS: VirtualAddress: 0x2000
SECTIONS: RawDataSize: 512
SECTIONS: PointerToRawData: 0x400
SECTIONS: PointerToRelocations: 0x0
SECTIONS: PointerToLineNumbers: 0x0
SECTIONS: RelocationCount: 0
SECTIONS: LineNumberCount: 0
SECTIONS: Characteristics [ (0xC0000040)
SECTIONS: IMAGE_SCN_CNT_INITIALIZED_DATA (0x40)
SECTIONS: IMAGE_SCN_MEM_READ (0x40000000)
SECTIONS: IMAGE_SCN_MEM_WRITE (0x80000000)
SECTIONS: ]
SECTIONS: }
SECTIONS: ]