sort-debug.test
12.1 KB
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
# RUN: yaml2obj %s -o %t.obj
# RUN: lld-link /debug /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj --sections %t.exe | FileCheck %s
# RUN: lld-link /debug:dwarf /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj --sections %t.exe | FileCheck %s
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj --sections %t.exe | FileCheck -check-prefix=NODEBUG %s
# RUN: lld-link /debug:symtab /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj --sections %t.exe | FileCheck -check-prefix=NODEBUG %s
# CHECK: Name: .text
# CHECK: Name: .reloc
# CHECK: Name: .debug_abbrev
# CHECK: Name: .debug_info
# CHECK: Name: .debug_line
# CHECK: Name: .debug_pubnames
# CHECK: Name: .debug_pubtypes
# NODEBUG: Name: .text
# NODEBUG: Name: .reloc
# NODEBUG-NOT: Name: .debug_abbrev
# NODEBUG-NOT: Name: .debug_info
# NODEBUG-NOT: Name: .debug_line
# NODEBUG-NOT: Name: .debug_pubnames
# NODEBUG-NOT: Name: .debug_pubtypes
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_I386
Characteristics: [ ]
sections:
- Name: .text
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 16
SectionData: 508D0500000000C70424000000005AC3
Relocations:
- VirtualAddress: 3
SymbolName: '?x@@3HA'
Type: IMAGE_REL_I386_DIR32
- Name: .data
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
Alignment: 4
SectionData: ''
- Name: .bss
Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
Alignment: 4
SectionData: ''
SizeOfRawData: 4
- Name: '.debug$S'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
Subsections:
- !Symbols
Records:
- Kind: S_GPROC32_ID
ProcSym:
PtrParent: 0
PtrEnd: 0
PtrNext: 0
CodeSize: 16
DbgStart: 0
DbgEnd: 0
FunctionType: 0
Segment: 0
Flags: [ ]
DisplayName: main
- Kind: S_PROC_ID_END
ScopeEndSym:
- !Lines
CodeSize: 16
Flags: [ HasColumnInfo ]
RelocOffset: 0
RelocSegment: 0
Blocks:
- FileName: '\usr\local\google\home\majnemer\llvm\src\tools\lld\<stdin>'
Lines:
- Offset: 0
LineStart: 1
IsStatement: false
EndDelta: 0
Columns:
- StartColumn: 0
EndColumn: 0
- !FileChecksums
Checksums:
- FileName: '\usr\local\google\home\majnemer\llvm\src\tools\lld\<stdin>'
Kind: None
Checksum: ''
- !StringTable
Strings:
- '\usr\local\google\home\majnemer\llvm\src\tools\lld\<stdin>'
Relocations:
- VirtualAddress: 44
SymbolName: _main
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 48
SymbolName: _main
Type: IMAGE_REL_I386_SECTION
- VirtualAddress: 68
SymbolName: _main
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 72
SymbolName: _main
Type: IMAGE_REL_I386_SECTION
- Name: .debug_str
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
SectionData: ''
- Name: .debug_loc
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
SectionData: ''
- Name: .debug_abbrev
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
SectionData: 011101250E1305030E10171B0E110112060000023400030E49133F193A0B3B0B02186E0E0000032400030E3E0B0B0B0000042E0011011206E77F194018030E3A0B3B0B49133F19000000
- Name: .debug_info
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
SectionData: 54000000040000000000040100000000040037000000000000003F000000000000001000000002720000003B0000000101050300000000780000000374000000050404000000001000000001548000000001013B00000000
Relocations:
- VirtualAddress: 6
SymbolName: .debug_abbrev
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 12
SymbolName: .debug_str
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 18
SymbolName: .debug_str
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 22
SymbolName: .debug_line
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 26
SymbolName: .debug_str
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 30
SymbolName: .text
Type: IMAGE_REL_I386_DIR32
- VirtualAddress: 39
SymbolName: .debug_str
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 51
SymbolName: '?x@@3HA'
Type: IMAGE_REL_I386_DIR32
- VirtualAddress: 55
SymbolName: .debug_str
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 60
SymbolName: .debug_str
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 67
SymbolName: .text
Type: IMAGE_REL_I386_DIR32
- VirtualAddress: 77
SymbolName: .debug_str
Type: IMAGE_REL_I386_SECREL
- Name: .debug_ranges
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
SectionData: ''
- Name: .debug_pubnames
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
SectionData: 1D00000002000000000058000000420000006D61696E0026000000780000000000
Relocations:
- VirtualAddress: 6
SymbolName: .debug_info
Type: IMAGE_REL_I386_SECREL
- Name: .debug_pubtypes
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
SectionData: 16000000020000000000580000003B000000696E740000000000
Relocations:
- VirtualAddress: 6
SymbolName: .debug_info
Type: IMAGE_REL_I386_SECREL
- Name: .debug_line
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
SectionData: 3300000002001E0000000101FB0E0D000101010100000001000001003C737464696E3E000000000000050200000000010AD60202000101
Relocations:
- VirtualAddress: 43
SymbolName: .text
Type: IMAGE_REL_I386_DIR32
symbols:
- Name: .text
Value: 0
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 16
NumberOfRelocations: 1
NumberOfLinenumbers: 0
CheckSum: 0
Number: 1
- Name: .data
Value: 0
SectionNumber: 2
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 0
NumberOfRelocations: 0
NumberOfLinenumbers: 0
CheckSum: 0
Number: 2
- Name: .bss
Value: 0
SectionNumber: 3
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 4
NumberOfRelocations: 0
NumberOfLinenumbers: 0
CheckSum: 0
Number: 3
- Name: '.debug$S'
Value: 0
SectionNumber: 4
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 188
NumberOfRelocations: 4
NumberOfLinenumbers: 0
CheckSum: 0
Number: 4
- Name: .debug_str
Value: 0
SectionNumber: 5
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 133
NumberOfRelocations: 0
NumberOfLinenumbers: 0
CheckSum: 0
Number: 5
- Name: .debug_loc
Value: 0
SectionNumber: 6
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 0
NumberOfRelocations: 0
NumberOfLinenumbers: 0
CheckSum: 0
Number: 6
- Name: .debug_abbrev
Value: 0
SectionNumber: 7
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 74
NumberOfRelocations: 0
NumberOfLinenumbers: 0
CheckSum: 0
Number: 7
- Name: .debug_info
Value: 0
SectionNumber: 8
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 88
NumberOfRelocations: 12
NumberOfLinenumbers: 0
CheckSum: 0
Number: 8
- Name: .debug_ranges
Value: 0
SectionNumber: 9
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 0
NumberOfRelocations: 0
NumberOfLinenumbers: 0
CheckSum: 0
Number: 9
- Name: .debug_pubnames
Value: 0
SectionNumber: 10
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 33
NumberOfRelocations: 1
NumberOfLinenumbers: 0
CheckSum: 0
Number: 10
- Name: .debug_pubtypes
Value: 0
SectionNumber: 11
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 26
NumberOfRelocations: 1
NumberOfLinenumbers: 0
CheckSum: 0
Number: 11
- Name: .debug_line
Value: 0
SectionNumber: 12
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 55
NumberOfRelocations: 1
NumberOfLinenumbers: 0
CheckSum: 0
Number: 12
- Name: '@feat.00'
Value: 1
SectionNumber: -1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- Name: _main
Value: 0
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_FUNCTION
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
- Name: '?x@@3HA'
Value: 0
SectionNumber: 3
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
...