1# RUN: yaml2obj < %s > %t.obj
2# RUN: lld-link -safeseh:no /out:%t.exe /entry:main %t.obj
3# RUN: llvm-objdump -s %t.exe | FileCheck %s
4
5# CHECK:      Contents of section .text:
6# CHECK-NEXT: 1000 00200000
7
8# CHECK:      Contents of section .rdata:
9# CHECK-NEXT: 2000 04104000
10
11--- !COFF
12header:
13  Machine:         IMAGE_FILE_MACHINE_I386
14  Characteristics: []
15sections:
16  - Name:            .text
17    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
18    Alignment:       4
19    SectionData:     00000000
20    Relocations:
21      - VirtualAddress:  0
22        SymbolName:      __imp__main
23        Type:            IMAGE_REL_I386_DIR32NB
24symbols:
25  - Name:            .text
26    Value:           0
27    SectionNumber:   1
28    SimpleType:      IMAGE_SYM_TYPE_NULL
29    ComplexType:     IMAGE_SYM_DTYPE_NULL
30    StorageClass:    IMAGE_SYM_CLASS_STATIC
31    SectionDefinition:
32      Length:          4
33      NumberOfRelocations: 1
34      NumberOfLinenumbers: 0
35      CheckSum:        0
36      Number:          0
37      Selection:       IMAGE_COMDAT_SELECT_ANY
38  - Name:            _main
39    Value:           4
40    SectionNumber:   1
41    SimpleType:      IMAGE_SYM_TYPE_NULL
42    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
43    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
44  - Name:            __imp__main
45    Value:           0
46    SectionNumber:   0
47    SimpleType:      IMAGE_SYM_TYPE_NULL
48    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
49    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
50...
51