2013-05-21 18:53:50 +00:00
|
|
|
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
|
2013-04-05 02:02:05 +00:00
|
|
|
|
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-I386: header:
|
|
|
|
COFF-I386-NEXT: Machine: IMAGE_FILE_MACHINE_I386
|
2013-04-05 02:02:05 +00:00
|
|
|
|
|
|
|
COFF-I386: sections:
|
2013-05-17 22:58:42 +00:00
|
|
|
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
|
2013-04-05 02:02:05 +00:00
|
|
|
|
|
|
|
COFF-I386: Relocations:
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-I386-NEXT: - VirtualAddress: 14
|
2013-06-06 13:06:17 +00:00
|
|
|
COFF-I386-NEXT: SymbolName: L_.str
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-I386-NEXT: Type: IMAGE_REL_I386_DIR32
|
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-I386: - VirtualAddress: 19
|
2013-06-06 13:06:17 +00:00
|
|
|
COFF-I386-NEXT: SymbolName: _puts
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-I386-NEXT: Type: IMAGE_REL_I386_REL32
|
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-I386: - VirtualAddress: 24
|
2013-06-06 13:06:17 +00:00
|
|
|
COFF-I386-NEXT: SymbolName: _SomeOtherFunction
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-I386-NEXT: Type: IMAGE_REL_I386_REL32
|
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
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
|
2013-04-05 02:02:05 +00:00
|
|
|
|
|
|
|
COFF-I386: symbols:
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-I386-NEXT: - Name: .text
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-I386-NEXT: Value: 0
|
|
|
|
COFF-I386-NEXT: SectionNumber: 1
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
|
|
|
|
COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_STATIC
|
2014-03-19 04:47:47 +00:00
|
|
|
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
|
2013-04-05 02:02:05 +00:00
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-I386: - Name: .data
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-I386-NEXT: Value: 0
|
|
|
|
COFF-I386-NEXT: SectionNumber: 2
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
|
|
|
|
COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_STATIC
|
2014-03-19 04:47:47 +00:00
|
|
|
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
|
2013-04-05 02:02:05 +00:00
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-I386: - Name: _main
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-I386-NEXT: Value: 0
|
|
|
|
COFF-I386-NEXT: SectionNumber: 1
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_FUNCTION
|
|
|
|
COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_EXTERNAL
|
2013-04-05 02:02:05 +00:00
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-I386: - Name: L_.str
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-I386-NEXT: Value: 0
|
|
|
|
COFF-I386-NEXT: SectionNumber: 2
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
|
|
|
|
COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_STATIC
|
2013-04-05 02:02:05 +00:00
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-I386: - Name: _puts
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-I386-NEXT: Value: 0
|
|
|
|
COFF-I386-NEXT: SectionNumber: 0
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
|
|
|
|
COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_EXTERNAL
|
2013-04-05 02:02:05 +00:00
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-I386: - Name: _SomeOtherFunction
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-I386-NEXT: Value: 0
|
|
|
|
COFF-I386-NEXT: SectionNumber: 0
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
|
|
|
|
COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_EXTERNAL
|
2013-04-05 02:02:05 +00:00
|
|
|
|
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-X86-64: header:
|
|
|
|
COFF-X86-64-NEXT: Machine: IMAGE_FILE_MACHINE_AMD64
|
2013-04-05 02:02:05 +00:00
|
|
|
|
|
|
|
COFF-X86-64: sections:
|
2013-05-17 22:58:42 +00:00
|
|
|
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
|
2013-04-05 02:02:05 +00:00
|
|
|
|
|
|
|
COFF-X86-64: Relocations:
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-X86-64-NEXT: - VirtualAddress: 15
|
2013-06-06 13:06:17 +00:00
|
|
|
COFF-X86-64-NEXT: SymbolName: L.str
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-X86-64-NEXT: Type: IMAGE_REL_AMD64_REL32
|
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-X86-64: - VirtualAddress: 20
|
2013-06-06 13:06:17 +00:00
|
|
|
COFF-X86-64-NEXT: SymbolName: puts
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-X86-64-NEXT: Type: IMAGE_REL_AMD64_REL32
|
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-X86-64: - VirtualAddress: 25
|
2013-06-06 13:06:17 +00:00
|
|
|
COFF-X86-64-NEXT: SymbolName: SomeOtherFunction
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-X86-64-NEXT: Type: IMAGE_REL_AMD64_REL32
|
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
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
|
2013-04-05 02:02:05 +00:00
|
|
|
|
|
|
|
COFF-X86-64: symbols:
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-X86-64-NEXT: - Name: .text
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-X86-64-NEXT: Value: 0
|
|
|
|
COFF-X86-64-NEXT: SectionNumber: 1
|
2013-05-17 22:58:42 +00:00
|
|
|
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
|
2014-03-19 04:47:47 +00:00
|
|
|
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
|
2013-04-05 02:02:05 +00:00
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-X86-64: - Name: .data
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-X86-64-NEXT: Value: 0
|
|
|
|
COFF-X86-64-NEXT: SectionNumber: 2
|
2013-05-17 22:58:42 +00:00
|
|
|
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
|
2014-03-19 04:47:47 +00:00
|
|
|
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
|
2013-04-05 02:02:05 +00:00
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-X86-64: - Name: main
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-X86-64-NEXT: Value: 0
|
|
|
|
COFF-X86-64-NEXT: SectionNumber: 1
|
2013-05-17 22:58:42 +00:00
|
|
|
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
|
2013-04-05 02:02:05 +00:00
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-X86-64: - Name: L.str
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-X86-64-NEXT: Value: 0
|
|
|
|
COFF-X86-64-NEXT: SectionNumber: 2
|
2013-05-17 22:58:42 +00:00
|
|
|
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
|
2013-04-05 02:02:05 +00:00
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-X86-64: - Name: puts
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-X86-64-NEXT: Value: 0
|
|
|
|
COFF-X86-64-NEXT: SectionNumber: 0
|
2013-05-17 22:58:42 +00:00
|
|
|
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
|
2013-04-05 02:02:05 +00:00
|
|
|
|
2013-05-17 22:58:42 +00:00
|
|
|
COFF-X86-64: - Name: SomeOtherFunction
|
2013-04-05 02:02:05 +00:00
|
|
|
COFF-X86-64-NEXT: Value: 0
|
|
|
|
COFF-X86-64-NEXT: SectionNumber: 0
|
2013-05-17 22:58:42 +00:00
|
|
|
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
|
2013-06-05 03:20:13 +00:00
|
|
|
COFF-X86-64-NOT: NumberOfAuxSymbols
|