Debian Codegraph @

llvm/test/ObjectYAML/MachO/data-in-code.yaml

raw
1 --- !mach-o
2 FileHeader:
3 magic: 0xFEEDFACF
4 cputype: 0x1000007
5 cpusubtype: 0x3
6 filetype: 0x2
7 ncmds: 14
8 sizeofcmds: 744
9 flags: 0x200085
10 reserved: 0x0
11 LoadCommands:
12 - cmd: LC_SEGMENT_64
13 cmdsize: 72
14 segname: __PAGEZERO
15 vmaddr: 0
16 vmsize: 4294967296
17 fileoff: 0
18 filesize: 0
19 maxprot: 0
20 initprot: 0
21 nsects: 0
22 flags: 0
23 - cmd: LC_SEGMENT_64
24 cmdsize: 232
25 segname: __TEXT
26 vmaddr: 4294967296
27 vmsize: 16384
28 fileoff: 0
29 filesize: 16384
30 maxprot: 5
31 initprot: 5
32 nsects: 2
33 flags: 0
34 Sections:
35 - sectname: __text
36 segname: __TEXT
37 addr: 0x100003FB0
38 size: 8
39 offset: 0x3FB0
40 align: 4
41 reloff: 0x0
42 nreloc: 0
43 flags: 0x80000400
44 reserved1: 0x0
45 reserved2: 0x0
46 reserved3: 0x0
47 content: C30F1F0000000000
48 - sectname: __unwind_info
49 segname: __TEXT
50 addr: 0x100003FB8
51 size: 72
52 offset: 0x3FB8
53 align: 2
54 reloff: 0x0
55 nreloc: 0
56 flags: 0x0
57 reserved1: 0x0
58 reserved2: 0x0
59 reserved3: 0x0
60 content: 010000001C000000000000001C000000000000001C00000002000000B03F00003400000034000000B93F00000000000034000000030000000C000100100001000000000000000000
61 - cmd: LC_SEGMENT_64
62 cmdsize: 72
63 segname: __LINKEDIT
64 vmaddr: 4294983680
65 vmsize: 16384
66 fileoff: 16384
67 filesize: 160
68 maxprot: 1
69 initprot: 1
70 nsects: 0
71 flags: 0
72 - cmd: LC_DYLD_INFO_ONLY
73 cmdsize: 48
74 rebase_off: 0
75 rebase_size: 0
76 bind_off: 0
77 bind_size: 0
78 weak_bind_off: 0
79 weak_bind_size: 0
80 lazy_bind_off: 0
81 lazy_bind_size: 0
82 export_off: 16384
83 export_size: 48
84 - cmd: LC_SYMTAB
85 cmdsize: 24
86 symoff: 16448
87 nsyms: 3
88 stroff: 16496
89 strsize: 48
90 - cmd: LC_DYSYMTAB
91 cmdsize: 80
92 ilocalsym: 0
93 nlocalsym: 0
94 iextdefsym: 0
95 nextdefsym: 2
96 iundefsym: 2
97 nundefsym: 1
98 tocoff: 0
99 ntoc: 0
100 modtaboff: 0
101 nmodtab: 0
102 extrefsymoff: 0
103 nextrefsyms: 0
104 indirectsymoff: 0
105 nindirectsyms: 0
106 extreloff: 0
107 nextrel: 0
108 locreloff: 0
109 nlocrel: 0
110 - cmd: LC_LOAD_DYLINKER
111 cmdsize: 32
112 name: 12
113 Content: '/usr/lib/dyld'
114 ZeroPadBytes: 7
115 - cmd: LC_UUID
116 cmdsize: 24
117 uuid: 003A202C-BBD0-3633-81AC-48AD5F9CDE61
118 - cmd: LC_BUILD_VERSION
119 cmdsize: 32
120 platform: 1
121 minos: 786432
122 sdk: 787200
123 ntools: 1
124 Tools:
125 - tool: 3
126 version: 50069504
127 - cmd: LC_SOURCE_VERSION
128 cmdsize: 16
129 version: 0
130 - cmd: LC_MAIN
131 cmdsize: 24
132 entryoff: 16304
133 stacksize: 0
134 - cmd: LC_LOAD_DYLIB
135 cmdsize: 56
136 dylib:
137 name: 24
138 timestamp: 2
139 current_version: 85943299
140 compatibility_version: 65536
141 Content: '/usr/lib/libSystem.B.dylib'
142 ZeroPadBytes: 6
143 - cmd: LC_FUNCTION_STARTS
144 cmdsize: 16
145 dataoff: 16432
146 datasize: 8
147 - cmd: LC_DATA_IN_CODE
148 cmdsize: 16
149 dataoff: 16440
150 datasize: 8
151 LinkEditData:
152 ExportTrie:
153 TerminalSize: 0
154 NodeOffset: 0
155 Name: ''
156 Flags: 0x0
157 Address: 0x0
158 Other: 0x0
159 ImportName: ''
160 Children:
161 - TerminalSize: 0
162 NodeOffset: 5
163 Name: _
164 Flags: 0x0
165 Address: 0x0
166 Other: 0x0
167 ImportName: ''
168 Children:
169 - TerminalSize: 2
170 NodeOffset: 33
171 Name: _mh_execute_header
172 Flags: 0x0
173 Address: 0x0
174 Other: 0x0
175 ImportName: ''
176 - TerminalSize: 3
177 NodeOffset: 37
178 Name: main
179 Flags: 0x0
180 Address: 0x3FB0
181 Other: 0x0
182 ImportName: ''
183 NameList:
184 - n_strx: 2
185 n_type: 0xF
186 n_sect: 1
187 n_desc: 16
188 n_value: 4294967296
189 - n_strx: 22
190 n_type: 0xF
191 n_sect: 1
192 n_desc: 0
193 n_value: 4294983600
194 - n_strx: 28
195 n_type: 0x1
196 n_sect: 0
197 n_desc: 256
198 n_value: 0
199 StringTable:
200 - ' '
201 - __mh_execute_header
202 - _main
203 - dyld_stub_binder
204 - ''
205 - ''
206 - ''
207 FunctionStarts: [ 0x3FB0 ]
208 DataInCode:
209 - Offset: 0x3FB4
210 Length: 4
211 Kind: 0x4
212 ...
213
214 # RUN: yaml2obj %s | obj2yaml | FileCheck %s
215 # CHECK: DataInCode:
216 # CHECK-NEXT: - Offset: 0x3FB4
217 # CHECK-NEXT: Length: 4
218 # CHECK-NEXT: Kind: 0x4