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