llvm-6502/test/Object/obj2yaml.test

170 lines
6.5 KiB
Plaintext
Raw Normal View History

RUN: obj2yaml %p/Inputs/trivial-object-test.coff-i386 | FileCheck %s --check-prefix COFF-I386
RUN: obj2yaml %p/Inputs/trivial-object-test.coff-x86-64 | FileCheck %s --check-prefix COFF-X86-64
COFF-I386: header:
COFF-I386-NEXT: Machine: IMAGE_FILE_MACHINE_I386
COFF-I386: sections:
COFF-I386-NEXT: - Name: .text
COFF-I386-NEXT: Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
COFF-I386-NEXT: Alignment: 16
COFF-I386-NEXT: SectionData: 83EC0CC744240800000000C7042400000000E800000000E8000000008B44240883C40CC3
COFF-I386: Relocations:
COFF-I386-NEXT: - VirtualAddress: 14
COFF-I386-NEXT: SymbolName: L_.str
COFF-I386-NEXT: Type: IMAGE_REL_I386_DIR32
COFF-I386: - VirtualAddress: 19
COFF-I386-NEXT: SymbolName: _puts
COFF-I386-NEXT: Type: IMAGE_REL_I386_REL32
COFF-I386: - VirtualAddress: 24
COFF-I386-NEXT: SymbolName: _SomeOtherFunction
COFF-I386-NEXT: Type: IMAGE_REL_I386_REL32
COFF-I386: - Name: .data
COFF-I386-NEXT: Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
COFF-I386-NEXT: Alignment: 1
COFF-I386-NEXT: SectionData: 48656C6C6F20576F726C642100
COFF-I386: symbols:
COFF-I386-NEXT: - Name: .text
COFF-I386-NEXT: Value: 0
COFF-I386-NEXT: SectionNumber: 1
COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_STATIC
COFF-I386-NEXT: SectionDefinition:
COFF-I386-NEXT: Length: 36
COFF-I386-NEXT: NumberOfRelocations: 3
COFF-I386-NEXT: NumberOfLinenumbers: 0
COFF-I386-NEXT: CheckSum: 0
COFF-I386-NEXT: Number: 1
COFF-I386: - Name: .data
COFF-I386-NEXT: Value: 0
COFF-I386-NEXT: SectionNumber: 2
COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_STATIC
COFF-I386-NEXT: SectionDefinition:
COFF-I386-NEXT: Length: 13
COFF-I386-NEXT: NumberOfRelocations: 0
COFF-I386-NEXT: NumberOfLinenumbers: 0
COFF-I386-NEXT: CheckSum: 0
COFF-I386-NEXT: Number: 2
COFF-I386: - Name: _main
COFF-I386-NEXT: Value: 0
COFF-I386-NEXT: SectionNumber: 1
COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_FUNCTION
COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_EXTERNAL
COFF-I386: - Name: L_.str
COFF-I386-NEXT: Value: 0
COFF-I386-NEXT: SectionNumber: 2
COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_STATIC
COFF-I386: - Name: _puts
COFF-I386-NEXT: Value: 0
COFF-I386-NEXT: SectionNumber: 0
COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_EXTERNAL
COFF-I386: - Name: _SomeOtherFunction
COFF-I386-NEXT: Value: 0
COFF-I386-NEXT: SectionNumber: 0
COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_EXTERNAL
COFF-X86-64: header:
COFF-X86-64-NEXT: Machine: IMAGE_FILE_MACHINE_AMD64
COFF-X86-64: sections:
COFF-X86-64-NEXT: - Name: .text
COFF-X86-64-NEXT: Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
COFF-X86-64-NEXT: Alignment: 16
COFF-X86-64-NEXT: SectionData: 4883EC28C744242400000000488D0D00000000E800000000E8000000008B4424244883C428C3
COFF-X86-64: Relocations:
COFF-X86-64-NEXT: - VirtualAddress: 15
COFF-X86-64-NEXT: SymbolName: L.str
COFF-X86-64-NEXT: Type: IMAGE_REL_AMD64_REL32
COFF-X86-64: - VirtualAddress: 20
COFF-X86-64-NEXT: SymbolName: puts
COFF-X86-64-NEXT: Type: IMAGE_REL_AMD64_REL32
COFF-X86-64: - VirtualAddress: 25
COFF-X86-64-NEXT: SymbolName: SomeOtherFunction
COFF-X86-64-NEXT: Type: IMAGE_REL_AMD64_REL32
COFF-X86-64: - Name: .data
COFF-X86-64-NEXT: Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
COFF-X86-64-NEXT: Alignment: 1
COFF-X86-64-NEXT: SectionData: 48656C6C6F20576F726C642100
COFF-X86-64: symbols:
COFF-X86-64-NEXT: - Name: .text
COFF-X86-64-NEXT: Value: 0
COFF-X86-64-NEXT: SectionNumber: 1
COFF-X86-64-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
COFF-X86-64-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
COFF-X86-64-NEXT: StorageClass: IMAGE_SYM_CLASS_STATIC
COFF-X86-64-NEXT: SectionDefinition:
COFF-X86-64-NEXT: Length: 38
COFF-X86-64-NEXT: NumberOfRelocations: 3
COFF-X86-64-NEXT: NumberOfLinenumbers: 0
COFF-X86-64-NEXT: CheckSum: 0
COFF-X86-64-NEXT: Number: 1
COFF-X86-64: - Name: .data
COFF-X86-64-NEXT: Value: 0
COFF-X86-64-NEXT: SectionNumber: 2
COFF-X86-64-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
COFF-X86-64-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
COFF-X86-64-NEXT: StorageClass: IMAGE_SYM_CLASS_STATIC
COFF-X86-64-NEXT: SectionDefinition:
COFF-X86-64-NEXT: Length: 13
COFF-X86-64-NEXT: NumberOfRelocations: 0
COFF-X86-64-NEXT: NumberOfLinenumbers: 0
COFF-X86-64-NEXT: CheckSum: 0
COFF-X86-64-NEXT: Number: 2
COFF-X86-64: - Name: main
COFF-X86-64-NEXT: Value: 0
COFF-X86-64-NEXT: SectionNumber: 1
COFF-X86-64-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
COFF-X86-64-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
COFF-X86-64-NEXT: StorageClass: IMAGE_SYM_CLASS_EXTERNAL
COFF-X86-64: - Name: L.str
COFF-X86-64-NEXT: Value: 0
COFF-X86-64-NEXT: SectionNumber: 2
COFF-X86-64-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
COFF-X86-64-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
COFF-X86-64-NEXT: StorageClass: IMAGE_SYM_CLASS_STATIC
COFF-X86-64: - Name: puts
COFF-X86-64-NEXT: Value: 0
COFF-X86-64-NEXT: SectionNumber: 0
COFF-X86-64-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
COFF-X86-64-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
COFF-X86-64-NEXT: StorageClass: IMAGE_SYM_CLASS_EXTERNAL
COFF-X86-64: - Name: SomeOtherFunction
COFF-X86-64-NEXT: Value: 0
COFF-X86-64-NEXT: SectionNumber: 0
COFF-X86-64-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
COFF-X86-64-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
COFF-X86-64-NEXT: StorageClass: IMAGE_SYM_CLASS_EXTERNAL
COFF-X86-64-NOT: NumberOfAuxSymbols