• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: yaml2obj %s | obj2yaml | FileCheck %s
2
3--- !mach-o
4IsLittleEndian:  true
5FileHeader:      
6  magic:           0xFEEDFACF
7  cputype:         0x01000007
8  cpusubtype:      0x00000003
9  filetype:        0x00000001
10  ncmds:           4
11  sizeofcmds:      1392
12  flags:           0x00002000
13  reserved:        0x00000000
14LoadCommands:    
15  - cmd:             LC_SEGMENT_64
16    cmdsize:         1272
17    segname:         ''
18    vmaddr:          0
19    vmsize:          1086
20    fileoff:         1424
21    filesize:        1086
22    maxprot:         7
23    initprot:        7
24    nsects:          15
25    flags:           0
26    Sections:        
27      - sectname:        __text
28        segname:         __TEXT
29        addr:            0x0000000000000000
30        size:            93
31        offset:          0x00000590
32        align:           4
33        reloff:          0x000009D0
34        nreloc:          3
35        flags:           0x80000400
36        reserved1:       0x00000000
37        reserved2:       0x00000000
38        reserved3:       0x00000000
39      - sectname:        __cstring
40        segname:         __TEXT
41        addr:            0x000000000000005D
42        size:            48
43        offset:          0x000005ED
44        align:           0
45        reloff:          0x00000000
46        nreloc:          0
47        flags:           0x00000002
48        reserved1:       0x00000000
49        reserved2:       0x00000000
50        reserved3:       0x00000000
51      - sectname:        __debug_str
52        segname:         __DWARF
53        addr:            0x000000000000008D
54        size:            182
55        offset:          0x0000061D
56        align:           0
57        reloff:          0x00000000
58        nreloc:          0
59        flags:           0x02000000
60        reserved1:       0x00000000
61        reserved2:       0x00000000
62        reserved3:       0x00000000
63      - sectname:        __debug_loc
64        segname:         __DWARF
65        addr:            0x0000000000000143
66        size:            0
67        offset:          0x000006D3
68        align:           0
69        reloff:          0x00000000
70        nreloc:          0
71        flags:           0x02000000
72        reserved1:       0x00000000
73        reserved2:       0x00000000
74        reserved3:       0x00000000
75      - sectname:        __debug_abbrev
76        segname:         __DWARF
77        addr:            0x0000000000000143
78        size:            104
79        offset:          0x000006D3
80        align:           0
81        reloff:          0x00000000
82        nreloc:          0
83        flags:           0x02000000
84        reserved1:       0x00000000
85        reserved2:       0x00000000
86        reserved3:       0x00000000
87      - sectname:        __debug_info
88        segname:         __DWARF
89        addr:            0x00000000000001AB
90        size:            146
91        offset:          0x0000073B
92        align:           0
93        reloff:          0x000009E8
94        nreloc:          2
95        flags:           0x02000000
96        reserved1:       0x00000000
97        reserved2:       0x00000000
98        reserved3:       0x00000000
99      - sectname:        __debug_ranges
100        segname:         __DWARF
101        addr:            0x000000000000023D
102        size:            0
103        offset:          0x000007CD
104        align:           0
105        reloff:          0x00000000
106        nreloc:          0
107        flags:           0x02000000
108        reserved1:       0x00000000
109        reserved2:       0x00000000
110        reserved3:       0x00000000
111      - sectname:        __debug_macinfo
112        segname:         __DWARF
113        addr:            0x000000000000023D
114        size:            1
115        offset:          0x000007CD
116        align:           0
117        reloff:          0x00000000
118        nreloc:          0
119        flags:           0x02000000
120        reserved1:       0x00000000
121        reserved2:       0x00000000
122        reserved3:       0x00000000
123      - sectname:        __apple_names
124        segname:         __DWARF
125        addr:            0x000000000000023E
126        size:            60
127        offset:          0x000007CE
128        align:           0
129        reloff:          0x00000000
130        nreloc:          0
131        flags:           0x02000000
132        reserved1:       0x00000000
133        reserved2:       0x00000000
134        reserved3:       0x00000000
135      - sectname:        __apple_objc
136        segname:         __DWARF
137        addr:            0x000000000000027A
138        size:            36
139        offset:          0x0000080A
140        align:           0
141        reloff:          0x00000000
142        nreloc:          0
143        flags:           0x02000000
144        reserved1:       0x00000000
145        reserved2:       0x00000000
146        reserved3:       0x00000000
147      - sectname:        __apple_namespac
148        segname:         __DWARF
149        addr:            0x000000000000029E
150        size:            36
151        offset:          0x0000082E
152        align:           0
153        reloff:          0x00000000
154        nreloc:          0
155        flags:           0x02000000
156        reserved1:       0x00000000
157        reserved2:       0x00000000
158        reserved3:       0x00000000
159      - sectname:        __apple_types
160        segname:         __DWARF
161        addr:            0x00000000000002C2
162        size:            133
163        offset:          0x00000852
164        align:           0
165        reloff:          0x00000000
166        nreloc:          0
167        flags:           0x02000000
168        reserved1:       0x00000000
169        reserved2:       0x00000000
170        reserved3:       0x00000000
171      - sectname:        __compact_unwind
172        segname:         __LD
173        addr:            0x0000000000000348
174        size:            32
175        offset:          0x000008D8
176        align:           3
177        reloff:          0x000009F8
178        nreloc:          1
179        flags:           0x02000000
180        reserved1:       0x00000000
181        reserved2:       0x00000000
182        reserved3:       0x00000000
183      - sectname:        __eh_frame
184        segname:         __TEXT
185        addr:            0x0000000000000368
186        size:            64
187        offset:          0x000008F8
188        align:           3
189        reloff:          0x00000000
190        nreloc:          0
191        flags:           0x6800000B
192        reserved1:       0x00000000
193        reserved2:       0x00000000
194        reserved3:       0x00000000
195      - sectname:        __debug_line
196        segname:         __DWARF
197        addr:            0x00000000000003A8
198        size:            150
199        offset:          0x00000938
200        align:           0
201        reloff:          0x00000A00
202        nreloc:          1
203        flags:           0x02000000
204        reserved1:       0x00000000
205        reserved2:       0x00000000
206        reserved3:       0x00000000
207  - cmd:             LC_VERSION_MIN_MACOSX
208    cmdsize:         16
209    version:         658432
210    sdk:             0
211  - cmd:             LC_SYMTAB
212    cmdsize:         24
213    symoff:          2568
214    nsyms:           2
215    stroff:          2600
216    strsize:         36
217  - cmd:             LC_DYSYMTAB
218    cmdsize:         80
219    ilocalsym:       0
220    nlocalsym:       0
221    iextdefsym:      0
222    nextdefsym:      1
223    iundefsym:       1
224    nundefsym:       1
225    tocoff:          0
226    ntoc:            0
227    modtaboff:       0
228    nmodtab:         0
229    extrefsymoff:    0
230    nextrefsyms:     0
231    indirectsymoff:  0
232    nindirectsyms:   0
233    extreloff:       0
234    nextrel:         0
235    locreloff:       0
236    nlocrel:         0
237LinkEditData:    
238  NameList:        
239    - n_strx:          24
240      n_type:          0x0F
241      n_sect:          1
242      n_desc:          0
243      n_value:         0
244    - n_strx:          1
245      n_type:          0x01
246      n_sect:          0
247      n_desc:          0
248      n_value:         0
249  StringTable:     
250    - ''
251    - _compilerrt_abort_impl
252    - ___absvdi2
253    - ''
254DWARF:           
255  debug_str:       
256    - 'clang version 4.0.0 (trunk 290181) (llvm/trunk 290209)'
257    - ../compiler-rt/lib/builtins/absvdi2.c
258    - /Users/cbieneman/dev/open-source/llvm-build-rel
259    - int
260    - di_int
261    - long long int
262    - __absvdi2
263    - a
264    - N
265    - t
266  debug_abbrev:
267    - Table:
268        - Code:            0x00000001
269          Tag:             DW_TAG_compile_unit
270          Children:        DW_CHILDREN_yes
271          Attributes:
272            - Attribute:       DW_AT_producer
273              Form:            DW_FORM_strp
274            - Attribute:       DW_AT_language
275              Form:            DW_FORM_data2
276            - Attribute:       DW_AT_name
277              Form:            DW_FORM_strp
278            - Attribute:       DW_AT_stmt_list
279              Form:            DW_FORM_sec_offset
280            - Attribute:       DW_AT_comp_dir
281              Form:            DW_FORM_strp
282            - Attribute:       DW_AT_low_pc
283              Form:            DW_FORM_addr
284            - Attribute:       DW_AT_high_pc
285              Form:            DW_FORM_data4
286        - Code:            0x00000002
287          Tag:             DW_TAG_base_type
288          Children:        DW_CHILDREN_no
289          Attributes:
290            - Attribute:       DW_AT_name
291              Form:            DW_FORM_strp
292            - Attribute:       DW_AT_encoding
293              Form:            DW_FORM_data1
294            - Attribute:       DW_AT_byte_size
295              Form:            DW_FORM_data1
296        - Code:            0x00000003
297          Tag:             DW_TAG_typedef
298          Children:        DW_CHILDREN_no
299          Attributes:
300            - Attribute:       DW_AT_type
301              Form:            DW_FORM_ref4
302            - Attribute:       DW_AT_name
303              Form:            DW_FORM_strp
304            - Attribute:       DW_AT_decl_file
305              Form:            DW_FORM_data1
306            - Attribute:       DW_AT_decl_line
307              Form:            DW_FORM_data1
308        - Code:            0x00000004
309          Tag:             DW_TAG_subprogram
310          Children:        DW_CHILDREN_yes
311          Attributes:
312            - Attribute:       DW_AT_low_pc
313              Form:            DW_FORM_addr
314            - Attribute:       DW_AT_high_pc
315              Form:            DW_FORM_data4
316            - Attribute:       DW_AT_frame_base
317              Form:            DW_FORM_exprloc
318            - Attribute:       DW_AT_name
319              Form:            DW_FORM_strp
320            - Attribute:       DW_AT_decl_file
321              Form:            DW_FORM_data1
322            - Attribute:       DW_AT_decl_line
323              Form:            DW_FORM_data1
324            - Attribute:       DW_AT_prototyped
325              Form:            DW_FORM_flag_present
326            - Attribute:       DW_AT_type
327              Form:            DW_FORM_ref4
328            - Attribute:       DW_AT_external
329              Form:            DW_FORM_flag_present
330        - Code:            0x00000005
331          Tag:             DW_TAG_formal_parameter
332          Children:        DW_CHILDREN_no
333          Attributes:
334            - Attribute:       DW_AT_location
335              Form:            DW_FORM_exprloc
336            - Attribute:       DW_AT_name
337              Form:            DW_FORM_strp
338            - Attribute:       DW_AT_decl_file
339              Form:            DW_FORM_data1
340            - Attribute:       DW_AT_decl_line
341              Form:            DW_FORM_data1
342            - Attribute:       DW_AT_type
343              Form:            DW_FORM_ref4
344        - Code:            0x00000006
345          Tag:             DW_TAG_variable
346          Children:        DW_CHILDREN_no
347          Attributes:
348            - Attribute:       DW_AT_location
349              Form:            DW_FORM_exprloc
350            - Attribute:       DW_AT_name
351              Form:            DW_FORM_strp
352            - Attribute:       DW_AT_decl_file
353              Form:            DW_FORM_data1
354            - Attribute:       DW_AT_decl_line
355              Form:            DW_FORM_data1
356            - Attribute:       DW_AT_type
357              Form:            DW_FORM_ref4
358        - Code:            0x00000007
359          Tag:             DW_TAG_const_type
360          Children:        DW_CHILDREN_no
361          Attributes:
362            - Attribute:       DW_AT_type
363              Form:            DW_FORM_ref4
364...
365
366#CHECK: DWARF:
367#CHECK:   debug_str:
368#CHECK:     - 'clang version 4.0.0 (trunk 290181) (llvm/trunk 290209)'
369#CHECK:     - '../compiler-rt/lib/builtins/absvdi2.c'
370#CHECK:     - '/Users/cbieneman/dev/open-source/llvm-build-rel'
371#CHECK:     - int
372#CHECK:     - di_int
373#CHECK:     - long long int
374#CHECK:     - __absvdi2
375#CHECK:     - a
376#CHECK:     - N
377#CHECK:     - t
378#CHECK:   debug_abbrev:
379#CHECK:     - Code:            0x1
380#CHECK:       Tag:             DW_TAG_compile_unit
381#CHECK:       Children:        DW_CHILDREN_yes
382#CHECK:       Attributes:
383#CHECK:         - Attribute:       DW_AT_producer
384#CHECK:           Form:            DW_FORM_strp
385#CHECK:         - Attribute:       DW_AT_language
386#CHECK:           Form:            DW_FORM_data2
387#CHECK:         - Attribute:       DW_AT_name
388#CHECK:           Form:            DW_FORM_strp
389#CHECK:         - Attribute:       DW_AT_stmt_list
390#CHECK:           Form:            DW_FORM_sec_offset
391#CHECK:         - Attribute:       DW_AT_comp_dir
392#CHECK:           Form:            DW_FORM_strp
393#CHECK:         - Attribute:       DW_AT_low_pc
394#CHECK:           Form:            DW_FORM_addr
395#CHECK:         - Attribute:       DW_AT_high_pc
396#CHECK:           Form:            DW_FORM_data4
397#CHECK:     - Code:            0x2
398#CHECK:       Tag:             DW_TAG_base_type
399#CHECK:       Children:        DW_CHILDREN_no
400#CHECK:       Attributes:
401#CHECK:         - Attribute:       DW_AT_name
402#CHECK:           Form:            DW_FORM_strp
403#CHECK:         - Attribute:       DW_AT_encoding
404#CHECK:           Form:            DW_FORM_data1
405#CHECK:         - Attribute:       DW_AT_byte_size
406#CHECK:           Form:            DW_FORM_data1
407#CHECK:     - Code:            0x3
408#CHECK:       Tag:             DW_TAG_typedef
409#CHECK:       Children:        DW_CHILDREN_no
410#CHECK:       Attributes:
411#CHECK:         - Attribute:       DW_AT_type
412#CHECK:           Form:            DW_FORM_ref4
413#CHECK:         - Attribute:       DW_AT_name
414#CHECK:           Form:            DW_FORM_strp
415#CHECK:         - Attribute:       DW_AT_decl_file
416#CHECK:           Form:            DW_FORM_data1
417#CHECK:         - Attribute:       DW_AT_decl_line
418#CHECK:           Form:            DW_FORM_data1
419#CHECK:     - Code:            0x4
420#CHECK:       Tag:             DW_TAG_subprogram
421#CHECK:       Children:        DW_CHILDREN_yes
422#CHECK:       Attributes:
423#CHECK:         - Attribute:       DW_AT_low_pc
424#CHECK:           Form:            DW_FORM_addr
425#CHECK:         - Attribute:       DW_AT_high_pc
426#CHECK:           Form:            DW_FORM_data4
427#CHECK:         - Attribute:       DW_AT_frame_base
428#CHECK:           Form:            DW_FORM_exprloc
429#CHECK:         - Attribute:       DW_AT_name
430#CHECK:           Form:            DW_FORM_strp
431#CHECK:         - Attribute:       DW_AT_decl_file
432#CHECK:           Form:            DW_FORM_data1
433#CHECK:         - Attribute:       DW_AT_decl_line
434#CHECK:           Form:            DW_FORM_data1
435#CHECK:         - Attribute:       DW_AT_prototyped
436#CHECK:           Form:            DW_FORM_flag_present
437#CHECK:         - Attribute:       DW_AT_type
438#CHECK:           Form:            DW_FORM_ref4
439#CHECK:         - Attribute:       DW_AT_external
440#CHECK:           Form:            DW_FORM_flag_present
441#CHECK:     - Code:            0x5
442#CHECK:       Tag:             DW_TAG_formal_parameter
443#CHECK:       Children:        DW_CHILDREN_no
444#CHECK:       Attributes:
445#CHECK:         - Attribute:       DW_AT_location
446#CHECK:           Form:            DW_FORM_exprloc
447#CHECK:         - Attribute:       DW_AT_name
448#CHECK:           Form:            DW_FORM_strp
449#CHECK:         - Attribute:       DW_AT_decl_file
450#CHECK:           Form:            DW_FORM_data1
451#CHECK:         - Attribute:       DW_AT_decl_line
452#CHECK:           Form:            DW_FORM_data1
453#CHECK:         - Attribute:       DW_AT_type
454#CHECK:           Form:            DW_FORM_ref4
455#CHECK:     - Code:            0x6
456#CHECK:       Tag:             DW_TAG_variable
457#CHECK:       Children:        DW_CHILDREN_no
458#CHECK:       Attributes:
459#CHECK:         - Attribute:       DW_AT_location
460#CHECK:           Form:            DW_FORM_exprloc
461#CHECK:         - Attribute:       DW_AT_name
462#CHECK:           Form:            DW_FORM_strp
463#CHECK:         - Attribute:       DW_AT_decl_file
464#CHECK:           Form:            DW_FORM_data1
465#CHECK:         - Attribute:       DW_AT_decl_line
466#CHECK:           Form:            DW_FORM_data1
467#CHECK:         - Attribute:       DW_AT_type
468#CHECK:           Form:            DW_FORM_ref4
469#CHECK:     - Code:            0x7
470#CHECK:       Tag:             DW_TAG_const_type
471#CHECK:       Children:        DW_CHILDREN_no
472#CHECK:       Attributes:
473#CHECK:         - Attribute:       DW_AT_type
474#CHECK:           Form:            DW_FORM_ref4
475#CHECK: ...
476