2016-06-27 19:53:53 +00:00
|
|
|
# RUN: yaml2obj -docnum=1 %s \
|
2014-05-31 04:51:07 +00:00
|
|
|
# RUN: | llvm-readobj -symbols - | FileCheck -check-prefix=DOC1 %s
|
2016-06-27 19:53:53 +00:00
|
|
|
# RUN: yaml2obj -docnum=2 %s \
|
2014-05-31 04:51:07 +00:00
|
|
|
# RUN: | llvm-readobj -symbols - | FileCheck -check-prefix=DOC2 %s
|
2016-06-27 19:53:53 +00:00
|
|
|
# RUN: not yaml2obj -docnum=3 %s 2>&1 \
|
2014-05-31 04:51:07 +00:00
|
|
|
# RUN: | FileCheck -check-prefix=DOC3 %s
|
|
|
|
|
|
|
|
# DOC1: Name: _sym1
|
|
|
|
# DOC2: Name: _sym2
|
|
|
|
# DOC3: yaml2obj: Cannot find the 3rd document
|
|
|
|
|
2016-06-27 19:53:53 +00:00
|
|
|
--- !COFF
|
2014-05-31 04:51:07 +00:00
|
|
|
header:
|
|
|
|
Machine: IMAGE_FILE_MACHINE_I386
|
|
|
|
Characteristics: [ IMAGE_FILE_DEBUG_STRIPPED ]
|
|
|
|
|
|
|
|
sections:
|
|
|
|
- Name: .text
|
|
|
|
Alignment: 16
|
|
|
|
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE,
|
|
|
|
IMAGE_SCN_MEM_READ ]
|
|
|
|
SectionData: "00000000"
|
|
|
|
|
|
|
|
symbols:
|
|
|
|
- Name: .text
|
|
|
|
Value: 0
|
|
|
|
SectionNumber: 1
|
|
|
|
SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
ComplexType: IMAGE_SYM_DTYPE_NULL
|
|
|
|
StorageClass: IMAGE_SYM_CLASS_STATIC
|
|
|
|
SectionDefinition:
|
|
|
|
Length: 36
|
|
|
|
NumberOfRelocations: 3
|
|
|
|
NumberOfLinenumbers: 0
|
|
|
|
CheckSum: 0
|
|
|
|
Number: 1
|
|
|
|
|
|
|
|
- Name: _main
|
|
|
|
Value: 0
|
|
|
|
SectionNumber: 1
|
|
|
|
SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
ComplexType: IMAGE_SYM_DTYPE_FUNCTION
|
|
|
|
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
|
|
|
|
|
|
|
|
- Name: _sym1
|
|
|
|
Value: 0
|
|
|
|
SectionNumber: 0
|
|
|
|
SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
ComplexType: IMAGE_SYM_DTYPE_NULL
|
|
|
|
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
|
|
|
|
|
2016-06-27 19:53:53 +00:00
|
|
|
--- !COFF
|
2014-05-31 04:51:07 +00:00
|
|
|
header:
|
|
|
|
Machine: IMAGE_FILE_MACHINE_I386
|
|
|
|
Characteristics: [ IMAGE_FILE_DEBUG_STRIPPED ]
|
|
|
|
|
|
|
|
sections:
|
|
|
|
- Name: .text
|
|
|
|
Alignment: 16
|
|
|
|
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE,
|
|
|
|
IMAGE_SCN_MEM_READ ]
|
|
|
|
SectionData: "00000000"
|
|
|
|
|
|
|
|
symbols:
|
|
|
|
- Name: .text
|
|
|
|
Value: 0
|
|
|
|
SectionNumber: 1
|
|
|
|
SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
ComplexType: IMAGE_SYM_DTYPE_NULL
|
|
|
|
StorageClass: IMAGE_SYM_CLASS_STATIC
|
|
|
|
SectionDefinition:
|
|
|
|
Length: 36
|
|
|
|
NumberOfRelocations: 3
|
|
|
|
NumberOfLinenumbers: 0
|
|
|
|
CheckSum: 0
|
|
|
|
Number: 1
|
|
|
|
|
|
|
|
- Name: _main
|
|
|
|
Value: 0
|
|
|
|
SectionNumber: 1
|
|
|
|
SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
ComplexType: IMAGE_SYM_DTYPE_FUNCTION
|
|
|
|
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
|
|
|
|
|
|
|
|
- Name: _sym2
|
|
|
|
Value: 0
|
|
|
|
SectionNumber: 0
|
|
|
|
SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
ComplexType: IMAGE_SYM_DTYPE_NULL
|
|
|
|
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
|
|
|
|
...
|