llvm.org GIT mirror llvm / 7593509
[obj2yaml][yaml2obj] Support for MachO lazy bindings This adds support for YAML round tripping dyld info lazy bindings. The storage and format of these is the same as regular bind opcodes, they are just interpreted differently by dyld, and can have DONE opcodes in the middle of the opcode lists. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270920 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Bieneman 3 years ago
5 changed file(s) with 472 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
7474 std::vector RebaseOpcodes;
7575 std::vector BindOpcodes;
7676 std::vector WeakBindOpcodes;
77 std::vector LazyBindOpcodes;
7778 };
7879
7980 struct Object {
101101 IO.mapOptional("RebaseOpcodes", LinkEditData.RebaseOpcodes);
102102 IO.mapOptional("BindOpcodes", LinkEditData.BindOpcodes);
103103 IO.mapOptional("WeakBindOpcodes", LinkEditData.WeakBindOpcodes);
104 IO.mapOptional("LazyBindOpcodes", LinkEditData.LazyBindOpcodes);
104105 }
105106
106107 void MappingTraits::mapping(
0 # RUN: yaml2obj -format=macho %s | obj2yaml | FileCheck %s
1
2 --- !mach-o
3 FileHeader:
4 magic: 0xFEEDFACF
5 cputype: 0x01000007
6 cpusubtype: 0x80000003
7 filetype: 0x00000002
8 ncmds: 4
9 sizeofcmds: 224
10 flags: 0x00218085
11 reserved: 0x00000000
12 LoadCommands:
13 - cmd: LC_SEGMENT_64
14 cmdsize: 72
15 segname: __LINKEDIT
16 vmaddr: 4294979584
17 vmsize: 4096
18 fileoff: 1024
19 filesize: 2508
20 maxprot: 7
21 initprot: 1
22 nsects: 0
23 flags: 0
24 - cmd: LC_DYLD_INFO_ONLY
25 cmdsize: 48
26 rebase_off: 1024
27 rebase_size: 8
28 bind_off: 0
29 bind_size: 0
30 weak_bind_off: 1032
31 weak_bind_size: 96
32 lazy_bind_off: 1128
33 lazy_bind_size: 624
34 export_off: 1752
35 export_size: 48
36 - cmd: LC_SYMTAB
37 cmdsize: 24
38 symoff: 1816
39 nsyms: 30
40 stroff: 2436
41 strsize: 1096
42 - cmd: LC_DYSYMTAB
43 cmdsize: 80
44 ilocalsym: 0
45 nlocalsym: 9
46 iextdefsym: 9
47 nextdefsym: 2
48 iundefsym: 11
49 nundefsym: 19
50 tocoff: 0
51 ntoc: 0
52 modtaboff: 0
53 nmodtab: 0
54 extrefsymoff: 0
55 nextrefsyms: 0
56 indirectsymoff: 2296
57 nindirectsyms: 35
58 extreloff: 0
59 nextrel: 0
60 locreloff: 0
61 nlocrel: 0
62 LinkEditData:
63 LazyBindOpcodes:
64 - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
65 Imm: 2
66 ULEBExtraData:
67 - 0x0000000000000028
68 - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
69 Imm: 1
70 - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
71 Imm: 0
72 Symbol: __ZNKSt3__16locale9use_facetERNS0_2idE
73 - Opcode: BIND_OPCODE_DO_BIND
74 Imm: 0
75 - Opcode: BIND_OPCODE_DONE
76 Imm: 0
77 - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
78 Imm: 2
79 ULEBExtraData:
80 - 0x0000000000000030
81 - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
82 Imm: 1
83 - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
84 Imm: 0
85 Symbol: __ZNKSt3__18ios_base6getlocEv
86 - Opcode: BIND_OPCODE_DO_BIND
87 Imm: 0
88 - Opcode: BIND_OPCODE_DONE
89 Imm: 0
90 - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
91 Imm: 2
92 ULEBExtraData:
93 - 0x0000000000000038
94 - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
95 Imm: 1
96 - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
97 Imm: 0
98 Symbol: __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc
99 - Opcode: BIND_OPCODE_DO_BIND
100 Imm: 0
101 - Opcode: BIND_OPCODE_DONE
102 Imm: 0
103 - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
104 Imm: 2
105 ULEBExtraData:
106 - 0x0000000000000040
107 - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
108 Imm: 1
109 - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
110 Imm: 0
111 Symbol: __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev
112 - Opcode: BIND_OPCODE_DO_BIND
113 Imm: 0
114 - Opcode: BIND_OPCODE_DONE
115 Imm: 0
116 - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
117 Imm: 2
118 ULEBExtraData:
119 - 0x0000000000000048
120 - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
121 Imm: 1
122 - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
123 Imm: 0
124 Symbol: __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_
125 - Opcode: BIND_OPCODE_DO_BIND
126 Imm: 0
127 - Opcode: BIND_OPCODE_DONE
128 Imm: 0
129 - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
130 Imm: 2
131 ULEBExtraData:
132 - 0x0000000000000050
133 - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
134 Imm: 1
135 - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
136 Imm: 0
137 Symbol: __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev
138 - Opcode: BIND_OPCODE_DO_BIND
139 Imm: 0
140 - Opcode: BIND_OPCODE_DONE
141 Imm: 0
142 - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
143 Imm: 2
144 ULEBExtraData:
145 - 0x0000000000000058
146 - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
147 Imm: 1
148 - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
149 Imm: 0
150 Symbol: __ZNSt3__16localeD1Ev
151 - Opcode: BIND_OPCODE_DO_BIND
152 Imm: 0
153 - Opcode: BIND_OPCODE_DONE
154 Imm: 0
155 - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
156 Imm: 2
157 ULEBExtraData:
158 - 0x0000000000000060
159 - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
160 Imm: 1
161 - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
162 Imm: 0
163 Symbol: __ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv
164 - Opcode: BIND_OPCODE_DO_BIND
165 Imm: 0
166 - Opcode: BIND_OPCODE_DONE
167 Imm: 0
168 - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
169 Imm: 2
170 ULEBExtraData:
171 - 0x0000000000000068
172 - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
173 Imm: 1
174 - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
175 Imm: 0
176 Symbol: __ZNSt3__18ios_base5clearEj
177 - Opcode: BIND_OPCODE_DO_BIND
178 Imm: 0
179 - Opcode: BIND_OPCODE_DONE
180 Imm: 0
181 - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
182 Imm: 2
183 ULEBExtraData:
184 - 0x0000000000000070
185 - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
186 Imm: 1
187 - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
188 Imm: 0
189 Symbol: __ZSt9terminatev
190 - Opcode: BIND_OPCODE_DO_BIND
191 Imm: 0
192 - Opcode: BIND_OPCODE_DONE
193 Imm: 0
194 - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
195 Imm: 2
196 ULEBExtraData:
197 - 0x0000000000000078
198 - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
199 Imm: 1
200 - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
201 Imm: 0
202 Symbol: ___cxa_begin_catch
203 - Opcode: BIND_OPCODE_DO_BIND
204 Imm: 0
205 - Opcode: BIND_OPCODE_DONE
206 Imm: 0
207 - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
208 Imm: 2
209 ULEBExtraData:
210 - 0x0000000000000080
211 - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
212 Imm: 1
213 - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
214 Imm: 0
215 Symbol: ___cxa_end_catch
216 - Opcode: BIND_OPCODE_DO_BIND
217 Imm: 0
218 - Opcode: BIND_OPCODE_DONE
219 Imm: 0
220 - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
221 Imm: 2
222 ULEBExtraData:
223 - 0x0000000000000088
224 - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
225 Imm: 2
226 - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
227 Imm: 0
228 Symbol: __Unwind_Resume
229 - Opcode: BIND_OPCODE_DO_BIND
230 Imm: 0
231 - Opcode: BIND_OPCODE_DONE
232 Imm: 0
233 - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
234 Imm: 2
235 ULEBExtraData:
236 - 0x0000000000000090
237 - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
238 Imm: 2
239 - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
240 Imm: 0
241 Symbol: _memset
242 - Opcode: BIND_OPCODE_DO_BIND
243 Imm: 0
244 - Opcode: BIND_OPCODE_DONE
245 Imm: 0
246 - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
247 Imm: 2
248 ULEBExtraData:
249 - 0x0000000000000098
250 - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
251 Imm: 2
252 - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
253 Imm: 0
254 Symbol: _strlen
255 - Opcode: BIND_OPCODE_DO_BIND
256 Imm: 0
257 - Opcode: BIND_OPCODE_DONE
258 Imm: 0
259 - Opcode: BIND_OPCODE_DONE
260 Imm: 0
261 - Opcode: BIND_OPCODE_DONE
262 Imm: 0
263 ...
264
265 #CHECK: LinkEditData:
266 #CHECK: LazyBindOpcodes:
267 #CHECK: - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
268 #CHECK: Imm: 2
269 #CHECK: ULEBExtraData:
270 #CHECK: - 0x0000000000000028
271 #CHECK: - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
272 #CHECK: Imm: 1
273 #CHECK: - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
274 #CHECK: Imm: 0
275 #CHECK: Symbol: __ZNKSt3__16locale9use_facetERNS0_2idE
276 #CHECK: - Opcode: BIND_OPCODE_DO_BIND
277 #CHECK: Imm: 0
278 #CHECK: - Opcode: BIND_OPCODE_DONE
279 #CHECK: Imm: 0
280 #CHECK: - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
281 #CHECK: Imm: 2
282 #CHECK: ULEBExtraData:
283 #CHECK: - 0x0000000000000030
284 #CHECK: - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
285 #CHECK: Imm: 1
286 #CHECK: - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
287 #CHECK: Imm: 0
288 #CHECK: Symbol: __ZNKSt3__18ios_base6getlocEv
289 #CHECK: - Opcode: BIND_OPCODE_DO_BIND
290 #CHECK: Imm: 0
291 #CHECK: - Opcode: BIND_OPCODE_DONE
292 #CHECK: Imm: 0
293 #CHECK: - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
294 #CHECK: Imm: 2
295 #CHECK: ULEBExtraData:
296 #CHECK: - 0x0000000000000038
297 #CHECK: - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
298 #CHECK: Imm: 1
299 #CHECK: - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
300 #CHECK: Imm: 0
301 #CHECK: Symbol: __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc
302 #CHECK: - Opcode: BIND_OPCODE_DO_BIND
303 #CHECK: Imm: 0
304 #CHECK: - Opcode: BIND_OPCODE_DONE
305 #CHECK: Imm: 0
306 #CHECK: - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
307 #CHECK: Imm: 2
308 #CHECK: ULEBExtraData:
309 #CHECK: - 0x0000000000000040
310 #CHECK: - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
311 #CHECK: Imm: 1
312 #CHECK: - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
313 #CHECK: Imm: 0
314 #CHECK: Symbol: __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev
315 #CHECK: - Opcode: BIND_OPCODE_DO_BIND
316 #CHECK: Imm: 0
317 #CHECK: - Opcode: BIND_OPCODE_DONE
318 #CHECK: Imm: 0
319 #CHECK: - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
320 #CHECK: Imm: 2
321 #CHECK: ULEBExtraData:
322 #CHECK: - 0x0000000000000048
323 #CHECK: - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
324 #CHECK: Imm: 1
325 #CHECK: - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
326 #CHECK: Imm: 0
327 #CHECK: Symbol: __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_
328 #CHECK: - Opcode: BIND_OPCODE_DO_BIND
329 #CHECK: Imm: 0
330 #CHECK: - Opcode: BIND_OPCODE_DONE
331 #CHECK: Imm: 0
332 #CHECK: - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
333 #CHECK: Imm: 2
334 #CHECK: ULEBExtraData:
335 #CHECK: - 0x0000000000000050
336 #CHECK: - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
337 #CHECK: Imm: 1
338 #CHECK: - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
339 #CHECK: Imm: 0
340 #CHECK: Symbol: __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev
341 #CHECK: - Opcode: BIND_OPCODE_DO_BIND
342 #CHECK: Imm: 0
343 #CHECK: - Opcode: BIND_OPCODE_DONE
344 #CHECK: Imm: 0
345 #CHECK: - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
346 #CHECK: Imm: 2
347 #CHECK: ULEBExtraData:
348 #CHECK: - 0x0000000000000058
349 #CHECK: - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
350 #CHECK: Imm: 1
351 #CHECK: - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
352 #CHECK: Imm: 0
353 #CHECK: Symbol: __ZNSt3__16localeD1Ev
354 #CHECK: - Opcode: BIND_OPCODE_DO_BIND
355 #CHECK: Imm: 0
356 #CHECK: - Opcode: BIND_OPCODE_DONE
357 #CHECK: Imm: 0
358 #CHECK: - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
359 #CHECK: Imm: 2
360 #CHECK: ULEBExtraData:
361 #CHECK: - 0x0000000000000060
362 #CHECK: - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
363 #CHECK: Imm: 1
364 #CHECK: - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
365 #CHECK: Imm: 0
366 #CHECK: Symbol: __ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv
367 #CHECK: - Opcode: BIND_OPCODE_DO_BIND
368 #CHECK: Imm: 0
369 #CHECK: - Opcode: BIND_OPCODE_DONE
370 #CHECK: Imm: 0
371 #CHECK: - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
372 #CHECK: Imm: 2
373 #CHECK: ULEBExtraData:
374 #CHECK: - 0x0000000000000068
375 #CHECK: - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
376 #CHECK: Imm: 1
377 #CHECK: - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
378 #CHECK: Imm: 0
379 #CHECK: Symbol: __ZNSt3__18ios_base5clearEj
380 #CHECK: - Opcode: BIND_OPCODE_DO_BIND
381 #CHECK: Imm: 0
382 #CHECK: - Opcode: BIND_OPCODE_DONE
383 #CHECK: Imm: 0
384 #CHECK: - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
385 #CHECK: Imm: 2
386 #CHECK: ULEBExtraData:
387 #CHECK: - 0x0000000000000070
388 #CHECK: - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
389 #CHECK: Imm: 1
390 #CHECK: - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
391 #CHECK: Imm: 0
392 #CHECK: Symbol: __ZSt9terminatev
393 #CHECK: - Opcode: BIND_OPCODE_DO_BIND
394 #CHECK: Imm: 0
395 #CHECK: - Opcode: BIND_OPCODE_DONE
396 #CHECK: Imm: 0
397 #CHECK: - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
398 #CHECK: Imm: 2
399 #CHECK: ULEBExtraData:
400 #CHECK: - 0x0000000000000078
401 #CHECK: - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
402 #CHECK: Imm: 1
403 #CHECK: - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
404 #CHECK: Imm: 0
405 #CHECK: Symbol: ___cxa_begin_catch
406 #CHECK: - Opcode: BIND_OPCODE_DO_BIND
407 #CHECK: Imm: 0
408 #CHECK: - Opcode: BIND_OPCODE_DONE
409 #CHECK: Imm: 0
410 #CHECK: - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
411 #CHECK: Imm: 2
412 #CHECK: ULEBExtraData:
413 #CHECK: - 0x0000000000000080
414 #CHECK: - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
415 #CHECK: Imm: 1
416 #CHECK: - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
417 #CHECK: Imm: 0
418 #CHECK: Symbol: ___cxa_end_catch
419 #CHECK: - Opcode: BIND_OPCODE_DO_BIND
420 #CHECK: Imm: 0
421 #CHECK: - Opcode: BIND_OPCODE_DONE
422 #CHECK: Imm: 0
423 #CHECK: - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
424 #CHECK: Imm: 2
425 #CHECK: ULEBExtraData:
426 #CHECK: - 0x0000000000000088
427 #CHECK: - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
428 #CHECK: Imm: 2
429 #CHECK: - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
430 #CHECK: Imm: 0
431 #CHECK: Symbol: __Unwind_Resume
432 #CHECK: - Opcode: BIND_OPCODE_DO_BIND
433 #CHECK: Imm: 0
434 #CHECK: - Opcode: BIND_OPCODE_DONE
435 #CHECK: Imm: 0
436 #CHECK: - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
437 #CHECK: Imm: 2
438 #CHECK: ULEBExtraData:
439 #CHECK: - 0x0000000000000090
440 #CHECK: - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
441 #CHECK: Imm: 2
442 #CHECK: - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
443 #CHECK: Imm: 0
444 #CHECK: Symbol: _memset
445 #CHECK: - Opcode: BIND_OPCODE_DO_BIND
446 #CHECK: Imm: 0
447 #CHECK: - Opcode: BIND_OPCODE_DONE
448 #CHECK: Imm: 0
449 #CHECK: - Opcode: BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
450 #CHECK: Imm: 2
451 #CHECK: ULEBExtraData:
452 #CHECK: - 0x0000000000000098
453 #CHECK: - Opcode: BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
454 #CHECK: Imm: 2
455 #CHECK: - Opcode: BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
456 #CHECK: Imm: 0
457 #CHECK: Symbol: _strlen
458 #CHECK: - Opcode: BIND_OPCODE_DO_BIND
459 #CHECK: Imm: 0
460 #CHECK: - Opcode: BIND_OPCODE_DONE
461 #CHECK: Imm: 0
462 #CHECK: - Opcode: BIND_OPCODE_DONE
463 #CHECK: Imm: 0
464 #CHECK: - Opcode: BIND_OPCODE_DONE
465 #CHECK: Imm: 0
198198 dumpBindOpcodes(Y->LinkEdit.BindOpcodes, Obj.getDyldInfoBindOpcodes());
199199 dumpBindOpcodes(Y->LinkEdit.WeakBindOpcodes,
200200 Obj.getDyldInfoWeakBindOpcodes());
201 dumpBindOpcodes(Y->LinkEdit.LazyBindOpcodes,
202 Obj.getDyldInfoLazyBindOpcodes(), true);
201203 }
202204
203205 void MachODumper::dumpRebaseOpcodes(std::unique_ptr &Y) {
314314 writeBindOpcodes(OS, DyldInfoOnlyCmd->bind_off, LinkEdit.BindOpcodes);
315315 writeBindOpcodes(OS, DyldInfoOnlyCmd->weak_bind_off,
316316 LinkEdit.WeakBindOpcodes);
317 writeBindOpcodes(OS, DyldInfoOnlyCmd->lazy_bind_off,
318 LinkEdit.LazyBindOpcodes);
317319
318320 // Fill to the end of the string table
319321 ZeroToOffset(OS, SymtabCmd->stroff + SymtabCmd->strsize);