aboutsummaryrefslogtreecommitdiffstats
path: root/test/Object/obj2yaml.test
blob: 49541336c682637dccfc177415d40e142101ab57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
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:    NumberOfAuxSymbols: 1
COFF-I386-NEXT:    AuxiliaryData: 240000000300000000000000010000000000

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:    NumberOfAuxSymbols: 1
COFF-I386-NEXT:    AuxiliaryData: 0D0000000000000000000000020000000000

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:     NumberOfAuxSymbols: 1
COFF-X86-64-NEXT:     AuxiliaryData: 260000000300000000000000010000000000

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:     NumberOfAuxSymbols: 1
COFF-X86-64-NEXT:     AuxiliaryData: 0D0000000000000000000000020000000000

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