basic-lto-linking-x86.test
13.4 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
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
RUN: dsymutil -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic-lto.macho.x86_64 | llvm-dwarfdump -a - | FileCheck %s
RUN: dsymutil -oso-prepend-path=%p/.. -dump-debug-map %p/../Inputs/basic-lto.macho.x86_64 | dsymutil -f -o - -y - | llvm-dwarfdump -a - | FileCheck %s
CHECK: file format Mach-O 64-bit x86-64
CHECK: debug_info contents
CHECK: Compile Unit:
CHECK: DW_TAG_compile_unit
CHECK: DW_AT_producer ("Apple LLVM version 6.0 (clang-600.0.39) (based on LLVM 3.5svn)")
CHECK: DW_AT_language (DW_LANG_C99)
CHECK: DW_AT_name ("basic1.c")
CHECK: DW_AT_stmt_list (0x00000000)
CHECK: DW_AT_comp_dir ("/Inputs")
CHECK: DW_AT_low_pc (0x0000000100000f40)
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name ("main")
CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic1.c")
CHECK: DW_AT_decl_line (23)
CHECK: DW_AT_prototyped (0x01)
CHECK: DW_AT_type (0x00000063
CHECK: DW_AT_external (0x01)
CHECK: DW_AT_accessibility (DW_ACCESS_public)
CHECK: DW_AT_low_pc (0x0000000100000f40)
CHECK: DW_AT_high_pc (0x0000000100000f4b)
CHECK: DW_AT_frame_base (DW_OP_reg6 RBP)
CHECK: DW_TAG_formal_parameter
CHECK: DW_AT_name ("argc")
CHECK: DW_AT_type (0x00000063
CHECK: DW_AT_location (DW_OP_reg5 RDI, DW_OP_piece 0x4)
CHECK: DW_TAG_formal_parameter
CHECK: DW_AT_name ("argv")
CHECK: DW_AT_type (0x0000006a
CHECK: DW_AT_location (DW_OP_reg4 RSI)
CHECK: NULL
CHECK: DW_TAG_base_type
CHECK: DW_AT_name ("int")
CHECK: DW_AT_encoding (DW_ATE_signed)
CHECK: DW_AT_byte_size (0x04)
CHECK: DW_TAG_pointer_type
CHECK: DW_AT_type (0x0000006f
CHECK: DW_TAG_pointer_type
CHECK: DW_AT_type (0x00000074
CHECK: DW_TAG_const_type
CHECK: DW_AT_type (0x00000079
CHECK: DW_TAG_base_type
CHECK: DW_AT_name ("char")
CHECK: DW_AT_encoding (DW_ATE_signed_char)
CHECK: DW_AT_byte_size (0x01)
CHECK: NULL
CHECK: Compile Unit:
CHECK: DW_TAG_compile_unit
CHECK: DW_AT_producer ("Apple LLVM version 6.0 (clang-600.0.39) (based on LLVM 3.5svn)")
CHECK: DW_AT_name ("basic2.c")
CHECK: DW_AT_stmt_list (0x0000003e)
CHECK: DW_AT_comp_dir ("/Inputs")
CHECK: DW_AT_low_pc (0x0000000100000f50)
CHECK: DW_TAG_variable
CHECK: DW_AT_name ("private_int")
CHECK: DW_AT_type (0x0000000000000063
CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic2.c")
CHECK: DW_AT_location (DW_OP_addr 0x100001008)
CHECK: DW_TAG_variable
CHECK: DW_AT_name ("baz")
CHECK: DW_AT_type (0x0000000000000063
CHECK: DW_AT_location (DW_OP_addr 0x100001000)
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name ("foo")
CHECK: DW_AT_type (0x0000000000000063
CHECK: DW_AT_low_pc (0x0000000100000f50)
CHECK: DW_AT_high_pc (0x0000000100000f89)
CHECK: DW_AT_frame_base (DW_OP_reg6 RBP)
CHECK: DW_TAG_formal_parameter
CHECK: DW_AT_name ("arg")
CHECK: DW_AT_type (0x0000000000000063
CHECK: DW_AT_location (0x00000000
CHECK: [0x0000000100000f50, 0x0000000100000f5e): DW_OP_reg5 RDI, DW_OP_piece 0x4)
CHECK:[[INC1:0x[0-9a-f]*]]{{.*}}DW_TAG_inlined_subroutine
CHECK: DW_AT_abstract_origin (0x00000128 "inc")
CHECK: DW_AT_low_pc (0x0000000100000f63)
CHECK: DW_AT_high_pc (0x0000000100000f72)
CHECK: DW_AT_call_line (20)
CHECK: NULL
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name ("inc")
CHECK: DW_AT_type (0x0000000000000063
CHECK: DW_AT_inline (DW_INL_inlined)
CHECK: NULL
CHECK: Compile Unit:
CHECK: DW_TAG_compile_unit
CHECK: DW_AT_producer ("Apple LLVM version 6.0 (clang-600.0.39) (based on LLVM 3.5svn)")
CHECK: DW_AT_name ("basic3.c")
CHECK: DW_AT_stmt_list (0x0000007e)
CHECK: DW_AT_comp_dir ("/Inputs")
CHECK: DW_AT_low_pc (0x0000000100000f90)
CHECK: DW_TAG_variable
CHECK: DW_AT_name ("val")
CHECK: DW_AT_type (0x00000176
CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic3.c")
CHECK: DW_AT_location (DW_OP_addr 0x100001004)
CHECK: DW_TAG_volatile_type
CHECK: DW_AT_type (0x0000000000000063
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name ("bar")
CHECK: DW_AT_type (0x0000000000000063
CHECK: DW_AT_low_pc (0x0000000100000f90)
CHECK: DW_AT_high_pc (0x0000000100000fb4)
CHECK: DW_AT_frame_base (DW_OP_reg6 RBP)
CHECK: DW_TAG_formal_parameter
CHECK: DW_AT_name ("arg")
CHECK: DW_AT_type (0x0000000000000063
CHECK: DW_AT_location (0x00000025
CHECK: [0x0000000100000f90, 0x0000000100000f9f): DW_OP_reg5 RDI, DW_OP_piece 0x4
CHECK: [0x0000000100000fa9, 0x0000000100000fad): DW_OP_reg5 RDI, DW_OP_piece 0x4)
CHECK: DW_TAG_lexical_block
CHECK: DW_AT_low_pc (0x0000000100000f94)
CHECK: DW_AT_high_pc (0x0000000100000fa7)
CHECK:[[INC2:0x[0-9a-f]*]]{{.*}}DW_TAG_inlined_subroutine
CHECK: DW_AT_abstract_origin (0x000001d4 "inc")
CHECK: DW_AT_ranges (0x00000000
CHECK: [0x0000000100000f94, 0x0000000100000f9a)
CHECK: [0x0000000100000f9f, 0x0000000100000fa7))
CHECK: NULL
CHECK: NULL
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name ("inc")
CHECK: DW_AT_type (0x0000000000000063
CHECK: NULL
CHECK: .debug_loc contents:
CHECK-NEXT: 0x00000000:
CHECK-NEXT: (0x0000000000000000, 0x000000000000000e): DW_OP_reg5 RDI, DW_OP_piece 0x4
CHECK-NOT: :
CHECK: 0x00000025:
CHECK-NEXT: (0x0000000000000000, 0x000000000000000f): DW_OP_reg5 RDI, DW_OP_piece 0x4
CHECK-NEXT: (0x0000000000000019, 0x000000000000001d): DW_OP_reg5 RDI, DW_OP_piece 0x4
CHECK: .debug_aranges contents:
CHECK-NEXT: Address Range Header: length = 0x0000002c, format = DWARF32, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00
CHECK-NEXT: [0x0000000100000f40, 0x0000000100000f4b)
CHECK-NEXT: Address Range Header: length = 0x0000002c, format = DWARF32, version = 0x0002, cu_offset = 0x00000081, addr_size = 0x08, seg_size = 0x00
CHECK-NEXT: [0x0000000100000f50, 0x0000000100000f89)
CHECK-NEXT: Address Range Header: length = 0x0000002c, format = DWARF32, version = 0x0002, cu_offset = 0x0000013a, addr_size = 0x08, seg_size = 0x00
CHECK-NEXT: [0x0000000100000f90, 0x0000000100000fb4)
CHECK: .debug_line contents
CHECK: file_names[ 1]:
CHECK-NEXT: name: "basic1.c"
CHECK-NEXT: dir_index: 0
CHECK: 0x0000000100000f40 23 0 1 0 0 is_stmt
CHECK: 0x0000000100000f44 24 0 1 0 0 is_stmt prologue_end
CHECK: 0x0000000100000f4b 24 0 1 0 0 is_stmt end_sequence
CHECK: file_names[ 1]:
CHECK-NEXT: name: "basic2.c"
CHECK-NEXT: dir_index: 0
CHECK: 0x0000000100000f50 19 0 1 0 0 is_stmt
CHECK: 0x0000000100000f54 20 0 1 0 0 is_stmt prologue_end
CHECK: 0x0000000100000f63 15 0 1 0 0 is_stmt
CHECK: 0x0000000100000f72 20 0 1 0 0 is_stmt
CHECK: 0x0000000100000f89 20 0 1 0 0 is_stmt end_sequence
CHECK: file_names[ 1]:
CHECK-NEXT: name: "basic3.c"
CHECK-NEXT: dir_index: 0
CHECK: 0x0000000100000f90 16 0 1 0 0 is_stmt
CHECK: 0x0000000100000f94 12 0 1 0 0 is_stmt prologue_end
CHECK: 0x0000000100000f9a 17 0 1 0 0 is_stmt
CHECK: 0x0000000100000f9f 12 0 1 0 0 is_stmt
CHECK: 0x0000000100000fa7 20 0 1 0 0 is_stmt
CHECK: 0x0000000100000fa9 19 0 1 0 0 is_stmt
CHECK: 0x0000000100000fb2 20 0 1 0 0 is_stmt
CHECK: 0x0000000100000fb4 20 0 1 0 0 is_stmt end_sequence
CHECK: .debug_pubnames contents:
CHECK-NEXT: length = 0x00000017, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000081
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x00000026 "main"
CHECK-NEXT: length = 0x0000002e, format = DWARF32, version = 0x0002, unit_offset = 0x00000081, unit_size = 0x000000b9
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x00000026 "private_int"
CHECK-NEXT: 0x0000003f "baz"
CHECK-NEXT: 0x00000058 "foo"
CHECK-NEXT: length = 0x0000001e, format = DWARF32, version = 0x0002, unit_offset = 0x0000013a, unit_size = 0x000000ac
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x00000026 "val"
CHECK-NEXT: 0x00000045 "bar"
CHECK: .debug_pubtypes contents:
CHECK-NEXT: length = 0x0000001f, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000081
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x00000063 "int"
CHECK-NEXT: 0x00000079 "char"
CHECK: .apple_names contents:
CHECK-NEXT: Header {
CHECK-NEXT: Magic: 0x48415348
CHECK-NEXT: Version: 0x1
CHECK-NEXT: Hash function: 0x0
CHECK-NEXT: Bucket count: 7
CHECK-NEXT: Hashes count: 7
CHECK-NEXT: HeaderData length: 12
CHECK-NEXT: }
CHECK-NEXT: DIE offset base: 0
CHECK-NEXT: Number of atoms: 1
CHECK-NEXT: Atoms [
CHECK-NEXT: Atom 0 {
CHECK-NEXT: Type: DW_ATOM_die_offset
CHECK-NEXT: Form: DW_FORM_data4
CHECK-NEXT: }
CHECK-NEXT: ]
CHECK-NEXT: Bucket 0 [
CHECK-NEXT: Hash 0xb8860c2 [
CHECK-NEXT: Name@0x74 {
CHECK-NEXT: String: 0x0000007e "baz"
CHECK-NEXT: Data 0 [
CHECK-NEXT: Atom[0]: 0x000000c0
CHECK-NEXT: ]
CHECK-NEXT: }
CHECK-NEXT: ]
CHECK-NEXT: Hash 0xb88801f [
CHECK-NEXT: Name@0x84 {
CHECK-NEXT: String: 0x0000008a "inc"
CHECK-NEXT: Data 0 [
CHECK-NEXT: Atom[0]: 0x00000110
CHECK-NEXT: ]
CHECK-NEXT: Data 1 [
CHECK-NEXT: Atom[0]: 0x000001c7
CHECK-NEXT: ]
CHECK-NEXT: }
CHECK-NEXT: ]
CHECK-NEXT: ]
CHECK-NEXT: Bucket 1 [
CHECK-NEXT: EMPTY
CHECK-NEXT: ]
CHECK-NEXT: Bucket 2 [
CHECK-NEXT: Hash 0xfed12c6a [
CHECK-NEXT: Name@0x98 {
CHECK-NEXT: String: 0x00000072 "private_int"
CHECK-NEXT: Data 0 [
CHECK-NEXT: Atom[0]: 0x000000a7
CHECK-NEXT: ]
CHECK-NEXT: }
CHECK-NEXT: ]
CHECK-NEXT: ]
CHECK-NEXT: Bucket 3 [
CHECK-NEXT: Hash 0xb88b5c8 [
CHECK-NEXT: Name@0xa8 {
CHECK-NEXT: String: 0x00000097 "val"
CHECK-NEXT: Data 0 [
CHECK-NEXT: Atom[0]: 0x00000160
CHECK-NEXT: ]
CHECK-NEXT: }
CHECK-NEXT: ]
CHECK-NEXT: Hash 0x7c9a7f6a [
CHECK-NEXT: Name@0xb8 {
CHECK-NEXT: String: 0x00000051 "main"
CHECK-NEXT: Data 0 [
CHECK-NEXT: Atom[0]: 0x00000026
CHECK-NEXT: ]
CHECK-NEXT: }
CHECK-NEXT: ]
CHECK-NEXT: ]
CHECK-NEXT: Bucket 4 [
CHECK-NEXT: EMPTY
CHECK-NEXT: ]
CHECK-NEXT: Bucket 5 [
CHECK-NEXT: Hash 0xb887389 [
CHECK-NEXT: Name@0xc8 {
CHECK-NEXT: String: 0x00000082 "foo"
CHECK-NEXT: Data 0 [
CHECK-NEXT: Atom[0]: 0x000000d9
CHECK-NEXT: ]
CHECK-NEXT: }
CHECK-NEXT: ]
CHECK-NEXT: ]
CHECK-NEXT: Bucket 6 [
CHECK-NEXT: Hash 0xb8860ba [
CHECK-NEXT: Name@0xd8 {
CHECK-NEXT: String: 0x0000009b "bar"
CHECK-NEXT: Data 0 [
CHECK-NEXT: Atom[0]: 0x0000017f
CHECK-NEXT: ]
CHECK-NEXT: }
CHECK-NEXT: ]
CHECK-NEXT: ]
CHECK: apple_types contents:
CHECK-NEXT: Header {
CHECK-NEXT: Magic: 0x48415348
CHECK-NEXT: Version: 0x1
CHECK-NEXT: Hash function: 0x0
CHECK-NEXT: Bucket count: 2
CHECK-NEXT: Hashes count: 2
CHECK-NEXT: HeaderData length: 24
CHECK-NEXT: }
CHECK-NEXT: DIE offset base: 0
CHECK-NEXT: Number of atoms: 4
CHECK-NEXT: Atoms [
CHECK-NEXT: Atom 0 {
CHECK-NEXT: Type: DW_ATOM_die_offset
CHECK-NEXT: Form: DW_FORM_data4
CHECK-NEXT: }
CHECK-NEXT: Atom 1 {
CHECK-NEXT: Type: DW_ATOM_die_tag
CHECK-NEXT: Form: DW_FORM_data2
CHECK-NEXT: }
CHECK-NEXT: Atom 2 {
CHECK-NEXT: Type: DW_ATOM_type_flags
CHECK-NEXT: Form: DW_FORM_data1
CHECK-NEXT: }
CHECK-NEXT: Atom 3 {
CHECK-NEXT: Type: DW_ATOM_qual_name_hash
CHECK-NEXT: Form: DW_FORM_data4
CHECK-NEXT: }
CHECK-NEXT: ]
CHECK-NEXT: Bucket 0 [
CHECK-NEXT: Hash 0xb888030 [
CHECK-NEXT: Name@0x44 {
CHECK-NEXT: String: 0x00000060 "int"
CHECK-NEXT: Data 0 [
CHECK-NEXT: Atom[0]: 0x00000063
CHECK-NEXT: Atom[1]: 0x0024
CHECK-NEXT: Atom[2]: 0x00
CHECK-NEXT: Atom[3]: 0x0c3a28a4
CHECK-NEXT: ]
CHECK-NEXT: }
CHECK-NEXT: ]
CHECK-NEXT: ]
CHECK-NEXT: Bucket 1 [
CHECK-NEXT: Hash 0x7c952063 [
CHECK-NEXT: Name@0x5b {
CHECK-NEXT: String: 0x00000064 "char"
CHECK-NEXT: Data 0 [
CHECK-NEXT: Atom[0]: 0x00000079
CHECK-NEXT: Atom[1]: 0x0024
CHECK-NEXT: Atom[2]: 0x00
CHECK-NEXT: Atom[3]: 0x937bd757
CHECK-NEXT: ]
CHECK-NEXT: }
CHECK-NEXT: ]
CHECK-NEXT: ]
CHECK: .apple_namespaces contents:
CHECK-NEXT: Header {
CHECK-NEXT: Magic: 0x48415348
CHECK-NEXT: Version: 0x1
CHECK-NEXT: Hash function: 0x0
CHECK-NEXT: Bucket count: 1
CHECK-NEXT: Hashes count: 0
CHECK-NEXT: HeaderData length: 12
CHECK-NEXT: }
CHECK-NEXT: DIE offset base: 0
CHECK-NEXT: Number of atoms: 1
CHECK-NEXT: Atoms [
CHECK-NEXT: Atom 0 {
CHECK-NEXT: Type: DW_ATOM_die_offset
CHECK-NEXT: Form: DW_FORM_data4
CHECK-NEXT: }
CHECK-NEXT: ]
CHECK-NEXT: Bucket 0 [
CHECK-NEXT: EMPTY
CHECK-NEXT: ]
CHECK: .apple_objc contents:
CHECK-NEXT: Header {
CHECK-NEXT: Magic: 0x48415348
CHECK-NEXT: Version: 0x1
CHECK-NEXT: Hash function: 0x0
CHECK-NEXT: Bucket count: 1
CHECK-NEXT: Hashes count: 0
CHECK-NEXT: HeaderData length: 12
CHECK-NEXT: }
CHECK-NEXT: DIE offset base: 0
CHECK-NEXT: Number of atoms: 1
CHECK-NEXT: Atoms [
CHECK-NEXT: Atom 0 {
CHECK-NEXT: Type: DW_ATOM_die_offset
CHECK-NEXT: Form: DW_FORM_data4
CHECK-NEXT: }
CHECK-NEXT: ]
CHECK-NEXT: Bucket 0 [
CHECK-NEXT: EMPTY
CHECK-NEXT: ]