1# RUN: yaml2obj %s | llvm-dwarfdump -u - | FileCheck %s
2# RUN: yaml2obj %s | llvm-dwarfdump --uuid - | FileCheck %s
3# CHECK: UUID: E5874E6F-946F-317B-B348-56FAEE59D8D1 (x86_64h) <stdin>
4--- !mach-o
5FileHeader:      
6  magic:           0xFEEDFACF
7  cputype:         0x01000007
8  cpusubtype:      0x80000008
9  filetype:        0x00000002
10  ncmds:           14
11  sizeofcmds:      728
12  flags:           0x00200085
13  reserved:        0x00000000
14LoadCommands:    
15  - cmd:             LC_SEGMENT_64
16    cmdsize:         72
17    segname:         __PAGEZERO
18    vmaddr:          0
19    vmsize:          4294967296
20    fileoff:         0
21    filesize:        0
22    maxprot:         0
23    initprot:        0
24    nsects:          0
25    flags:           0
26  - cmd:             LC_SEGMENT_64
27    cmdsize:         232
28    segname:         __TEXT
29    vmaddr:          4294967296
30    vmsize:          4096
31    fileoff:         0
32    filesize:        4096
33    maxprot:         7
34    initprot:        5
35    nsects:          2
36    flags:           0
37    Sections:        
38      - sectname:        __text
39        segname:         __TEXT
40        addr:            0x0000000100000FB0
41        size:            8
42        offset:          0x00000FB0
43        align:           0
44        reloff:          0x00000000
45        nreloc:          0
46        flags:           0x80000400
47        reserved1:       0x00000000
48        reserved2:       0x00000000
49        reserved3:       0x00000000
50      - sectname:        __unwind_info
51        segname:         __TEXT
52        addr:            0x0000000100000FB8
53        size:            72
54        offset:          0x00000FB8
55        align:           2
56        reloff:          0x00000000
57        nreloc:          0
58        flags:           0x00000000
59        reserved1:       0x00000000
60        reserved2:       0x00000000
61        reserved3:       0x00000000
62  - cmd:             LC_SEGMENT_64
63    cmdsize:         72
64    segname:         __LINKEDIT
65    vmaddr:          4294971392
66    vmsize:          4096
67    fileoff:         4096
68    filesize:        152
69    maxprot:         7
70    initprot:        1
71    nsects:          0
72    flags:           0
73  - cmd:             LC_DYLD_INFO_ONLY
74    cmdsize:         48
75    rebase_off:      0
76    rebase_size:     0
77    bind_off:        0
78    bind_size:       0
79    weak_bind_off:   0
80    weak_bind_size:  0
81    lazy_bind_off:   0
82    lazy_bind_size:  0
83    export_off:      4096
84    export_size:     48
85  - cmd:             LC_SYMTAB
86    cmdsize:         24
87    symoff:          4152
88    nsyms:           3
89    stroff:          4200
90    strsize:         48
91  - cmd:             LC_DYSYMTAB
92    cmdsize:         80
93    ilocalsym:       0
94    nlocalsym:       0
95    iextdefsym:      0
96    nextdefsym:      2
97    iundefsym:       2
98    nundefsym:       1
99    tocoff:          0
100    ntoc:            0
101    modtaboff:       0
102    nmodtab:         0
103    extrefsymoff:    0
104    nextrefsyms:     0
105    indirectsymoff:  0
106    nindirectsyms:   0
107    extreloff:       0
108    nextrel:         0
109    locreloff:       0
110    nlocrel:         0
111  - cmd:             LC_LOAD_DYLINKER
112    cmdsize:         32
113    name:            12
114    PayloadString:   /usr/lib/dyld
115    ZeroPadBytes:    7
116  - cmd:             LC_UUID
117    cmdsize:         24
118    uuid:            E5874E6F-946F-317B-B348-56FAEE59D8D1
119  - cmd:             LC_VERSION_MIN_MACOSX
120    cmdsize:         16
121    version:         658688
122    sdk:             658688
123  - cmd:             LC_SOURCE_VERSION
124    cmdsize:         16
125    version:         0
126  - cmd:             LC_MAIN
127    cmdsize:         24
128    entryoff:        4016
129    stacksize:       0
130  - cmd:             LC_LOAD_DYLIB
131    cmdsize:         56
132    dylib:           
133      name:            24
134      timestamp:       2
135      current_version: 81985536
136      compatibility_version: 65536
137    PayloadString:   /usr/lib/libSystem.B.dylib
138    ZeroPadBytes:    6
139  - cmd:             LC_FUNCTION_STARTS
140    cmdsize:         16
141    dataoff:         4144
142    datasize:        8
143  - cmd:             LC_DATA_IN_CODE
144    cmdsize:         16
145    dataoff:         4152
146    datasize:        0
147LinkEditData:    
148  ExportTrie:      
149    TerminalSize:    0
150    NodeOffset:      0
151    Name:            ''
152    Flags:           0x0000000000000000
153    Address:         0x0000000000000000
154    Other:           0x0000000000000000
155    ImportName:      ''
156    Children:        
157      - TerminalSize:    0
158        NodeOffset:      5
159        Name:            _
160        Flags:           0x0000000000000000
161        Address:         0x0000000000000000
162        Other:           0x0000000000000000
163        ImportName:      ''
164        Children:        
165          - TerminalSize:    2
166            NodeOffset:      33
167            Name:            _mh_execute_header
168            Flags:           0x0000000000000000
169            Address:         0x0000000000000000
170            Other:           0x0000000000000000
171            ImportName:      ''
172          - TerminalSize:    3
173            NodeOffset:      37
174            Name:            main
175            Flags:           0x0000000000000000
176            Address:         0x0000000000000FB0
177            Other:           0x0000000000000000
178            ImportName:      ''
179  NameList:        
180    - n_strx:          2
181      n_type:          0x0F
182      n_sect:          1
183      n_desc:          16
184      n_value:         4294967296
185    - n_strx:          22
186      n_type:          0x0F
187      n_sect:          1
188      n_desc:          0
189      n_value:         4294971312
190    - n_strx:          28
191      n_type:          0x01
192      n_sect:          0
193      n_desc:          256
194      n_value:         0
195  StringTable:     
196    - ' '
197    - __mh_execute_header
198    - _main
199    - dyld_stub_binder
200    - ''
201    - ''
202    - ''
203...
204