• Home
  • Raw
  • Download

Lines Matching full:io

84     IO &IO, MachOYAML::FileHeader &FileHdr) {  in mapping()  argument
85 IO.mapRequired("magic", FileHdr.magic); in mapping()
86 IO.mapRequired("cputype", FileHdr.cputype); in mapping()
87 IO.mapRequired("cpusubtype", FileHdr.cpusubtype); in mapping()
88 IO.mapRequired("filetype", FileHdr.filetype); in mapping()
89 IO.mapRequired("ncmds", FileHdr.ncmds); in mapping()
90 IO.mapRequired("sizeofcmds", FileHdr.sizeofcmds); in mapping()
91 IO.mapRequired("flags", FileHdr.flags); in mapping()
94 IO.mapRequired("reserved", FileHdr.reserved); in mapping()
97 void MappingTraits<MachOYAML::Object>::mapping(IO &IO, in mapping() argument
101 if (!IO.getContext()) { in mapping()
102 IO.setContext(&Object); in mapping()
104 IO.mapTag("!mach-o", true); in mapping()
105 IO.mapOptional("IsLittleEndian", Object.IsLittleEndian, in mapping()
109 IO.mapRequired("FileHeader", Object.Header); in mapping()
112 IO.mapOptional("LoadCommands", Object.LoadCommands); in mapping()
113 if(!Object.LinkEdit.isEmpty() || !IO.outputting()) in mapping()
114 IO.mapOptional("LinkEditData", Object.LinkEdit); in mapping()
116 if(!Object.DWARF.isEmpty() || !IO.outputting()) in mapping()
117 IO.mapOptional("DWARF", Object.DWARF); in mapping()
119 if (IO.getContext() == &Object) in mapping()
120 IO.setContext(nullptr); in mapping()
124 IO &IO, MachOYAML::FatHeader &FatHeader) { in mapping() argument
125 IO.mapRequired("magic", FatHeader.magic); in mapping()
126 IO.mapRequired("nfat_arch", FatHeader.nfat_arch); in mapping()
129 void MappingTraits<MachOYAML::FatArch>::mapping(IO &IO, in mapping() argument
131 IO.mapRequired("cputype", FatArch.cputype); in mapping()
132 IO.mapRequired("cpusubtype", FatArch.cpusubtype); in mapping()
133 IO.mapRequired("offset", FatArch.offset); in mapping()
134 IO.mapRequired("size", FatArch.size); in mapping()
135 IO.mapRequired("align", FatArch.align); in mapping()
136 IO.mapOptional("reserved", FatArch.reserved, in mapping()
141 IO &IO, MachOYAML::UniversalBinary &UniversalBinary) { in mapping() argument
142 if (!IO.getContext()) { in mapping()
143 IO.setContext(&UniversalBinary); in mapping()
144 IO.mapTag("!fat-mach-o", true); in mapping()
146 IO.mapRequired("FatHeader", UniversalBinary.Header); in mapping()
147 IO.mapRequired("FatArchs", UniversalBinary.FatArchs); in mapping()
148 IO.mapRequired("Slices", UniversalBinary.Slices); in mapping()
150 if (IO.getContext() == &UniversalBinary) in mapping()
151 IO.setContext(nullptr); in mapping()
155 IO &IO, MachOYAML::LinkEditData &LinkEditData) { in mapping() argument
156 IO.mapOptional("RebaseOpcodes", LinkEditData.RebaseOpcodes); in mapping()
157 IO.mapOptional("BindOpcodes", LinkEditData.BindOpcodes); in mapping()
158 IO.mapOptional("WeakBindOpcodes", LinkEditData.WeakBindOpcodes); in mapping()
159 IO.mapOptional("LazyBindOpcodes", LinkEditData.LazyBindOpcodes); in mapping()
160 if (!LinkEditData.ExportTrie.Children.empty() || !IO.outputting()) in mapping()
161 IO.mapOptional("ExportTrie", LinkEditData.ExportTrie); in mapping()
162 IO.mapOptional("NameList", LinkEditData.NameList); in mapping()
163 IO.mapOptional("StringTable", LinkEditData.StringTable); in mapping()
167 IO &IO, MachOYAML::RebaseOpcode &RebaseOpcode) { in mapping() argument
168 IO.mapRequired("Opcode", RebaseOpcode.Opcode); in mapping()
169 IO.mapRequired("Imm", RebaseOpcode.Imm); in mapping()
170 IO.mapOptional("ExtraData", RebaseOpcode.ExtraData); in mapping()
174 IO &IO, MachOYAML::BindOpcode &BindOpcode) { in mapping() argument
175 IO.mapRequired("Opcode", BindOpcode.Opcode); in mapping()
176 IO.mapRequired("Imm", BindOpcode.Imm); in mapping()
177 IO.mapOptional("ULEBExtraData", BindOpcode.ULEBExtraData); in mapping()
178 IO.mapOptional("SLEBExtraData", BindOpcode.SLEBExtraData); in mapping()
179 IO.mapOptional("Symbol", BindOpcode.Symbol); in mapping()
183 IO &IO, MachOYAML::ExportEntry &ExportEntry) { in mapping() argument
184 IO.mapRequired("TerminalSize", ExportEntry.TerminalSize); in mapping()
185 IO.mapOptional("NodeOffset", ExportEntry.NodeOffset); in mapping()
186 IO.mapOptional("Name", ExportEntry.Name); in mapping()
187 IO.mapOptional("Flags", ExportEntry.Flags); in mapping()
188 IO.mapOptional("Address", ExportEntry.Address); in mapping()
189 IO.mapOptional("Other", ExportEntry.Other); in mapping()
190 IO.mapOptional("ImportName", ExportEntry.ImportName); in mapping()
191 IO.mapOptional("Children", ExportEntry.Children); in mapping()
195 IO &IO, MachOYAML::NListEntry &NListEntry) { in mapping() argument
196 IO.mapRequired("n_strx", NListEntry.n_strx); in mapping()
197 IO.mapRequired("n_type", NListEntry.n_type); in mapping()
198 IO.mapRequired("n_sect", NListEntry.n_sect); in mapping()
199 IO.mapRequired("n_desc", NListEntry.n_desc); in mapping()
200 IO.mapRequired("n_value", NListEntry.n_value); in mapping()
204 void mapLoadCommandData(IO &IO, MachOYAML::LoadCommand &LoadCommand) {} in mapLoadCommandData() argument
208 IO &IO, MachOYAML::LoadCommand &LoadCommand) { in mapLoadCommandData() argument
209 IO.mapOptional("Sections", LoadCommand.Sections); in mapLoadCommandData()
214 IO &IO, MachOYAML::LoadCommand &LoadCommand) { in mapLoadCommandData() argument
215 IO.mapOptional("Sections", LoadCommand.Sections); in mapLoadCommandData()
220 IO &IO, MachOYAML::LoadCommand &LoadCommand) { in mapLoadCommandData() argument
221 IO.mapOptional("PayloadString", LoadCommand.PayloadString); in mapLoadCommandData()
226 IO &IO, MachOYAML::LoadCommand &LoadCommand) { in mapLoadCommandData() argument
227 IO.mapOptional("PayloadString", LoadCommand.PayloadString); in mapLoadCommandData()
232 IO &IO, MachOYAML::LoadCommand &LoadCommand) { in mapLoadCommandData() argument
233 IO.mapOptional("PayloadString", LoadCommand.PayloadString); in mapLoadCommandData()
238 IO &IO, MachOYAML::LoadCommand &LoadCommand) { in mapLoadCommandData() argument
239 IO.mapOptional("Tools", LoadCommand.Tools); in mapLoadCommandData()
243 IO &IO, MachOYAML::LoadCommand &LoadCommand) { in mapping() argument
246 IO.mapRequired("cmd", TempCmd); in mapping()
248 IO.mapRequired("cmdsize", LoadCommand.Data.load_command_data.cmdsize); in mapping()
252 MappingTraits<MachO::LCStruct>::mapping(IO, \ in mapping()
254 mapLoadCommandData<MachO::LCStruct>(IO, LoadCommand); \ in mapping()
260 IO.mapOptional("PayloadBytes", LoadCommand.PayloadBytes); in mapping()
261 IO.mapOptional("ZeroPadBytes", LoadCommand.ZeroPadBytes, (uint64_t)0ull); in mapping()
265 IO &IO, MachO::dyld_info_command &LoadCommand) { in mapping() argument
266 IO.mapRequired("rebase_off", LoadCommand.rebase_off); in mapping()
267 IO.mapRequired("rebase_size", LoadCommand.rebase_size); in mapping()
268 IO.mapRequired("bind_off", LoadCommand.bind_off); in mapping()
269 IO.mapRequired("bind_size", LoadCommand.bind_size); in mapping()
270 IO.mapRequired("weak_bind_off", LoadCommand.weak_bind_off); in mapping()
271 IO.mapRequired("weak_bind_size", LoadCommand.weak_bind_size); in mapping()
272 IO.mapRequired("lazy_bind_off", LoadCommand.lazy_bind_off); in mapping()
273 IO.mapRequired("lazy_bind_size", LoadCommand.lazy_bind_size); in mapping()
274 IO.mapRequired("export_off", LoadCommand.export_off); in mapping()
275 IO.mapRequired("export_size", LoadCommand.export_size); in mapping()
279 IO &IO, MachOYAML::Relocation &Relocation) { in mapping() argument
280 IO.mapRequired("address", Relocation.address); in mapping()
281 IO.mapRequired("symbolnum", Relocation.symbolnum); in mapping()
282 IO.mapRequired("pcrel", Relocation.is_pcrel); in mapping()
283 IO.mapRequired("length", Relocation.length); in mapping()
284 IO.mapRequired("extern", Relocation.is_extern); in mapping()
285 IO.mapRequired("type", Relocation.type); in mapping()
286 IO.mapRequired("scattered", Relocation.is_scattered); in mapping()
287 IO.mapRequired("value", Relocation.value); in mapping()
290 void MappingTraits<MachOYAML::Section>::mapping(IO &IO, in mapping() argument
292 IO.mapRequired("sectname", Section.sectname); in mapping()
293 IO.mapRequired("segname", Section.segname); in mapping()
294 IO.mapRequired("addr", Section.addr); in mapping()
295 IO.mapRequired("size", Section.size); in mapping()
296 IO.mapRequired("offset", Section.offset); in mapping()
297 IO.mapRequired("align", Section.align); in mapping()
298 IO.mapRequired("reloff", Section.reloff); in mapping()
299 IO.mapRequired("nreloc", Section.nreloc); in mapping()
300 IO.mapRequired("flags", Section.flags); in mapping()
301 IO.mapRequired("reserved1", Section.reserved1); in mapping()
302 IO.mapRequired("reserved2", Section.reserved2); in mapping()
303 IO.mapOptional("reserved3", Section.reserved3); in mapping()
304 IO.mapOptional("content", Section.content); in mapping()
305 IO.mapOptional("relocations", Section.relocations); in mapping()
309 MappingTraits<MachOYAML::Section>::validate(IO &IO, in validate() argument
317 IO &IO, MachO::build_tool_version &tool) { in mapping() argument
318 IO.mapRequired("tool", tool.tool); in mapping()
319 IO.mapRequired("version", tool.version); in mapping()
322 void MappingTraits<MachO::dylib>::mapping(IO &IO, MachO::dylib &DylibStruct) { in mapping() argument
323 IO.mapRequired("name", DylibStruct.name); in mapping()
324 IO.mapRequired("timestamp", DylibStruct.timestamp); in mapping()
325 IO.mapRequired("current_version", DylibStruct.current_version); in mapping()
326 IO.mapRequired("compatibility_version", DylibStruct.compatibility_version); in mapping()
330 IO &IO, MachO::dylib_command &LoadCommand) { in mapping() argument
331 IO.mapRequired("dylib", LoadCommand.dylib); in mapping()
335 IO &IO, MachO::dylinker_command &LoadCommand) { in mapping() argument
336 IO.mapRequired("name", LoadCommand.name); in mapping()
340 IO &IO, MachO::dysymtab_command &LoadCommand) { in mapping() argument
341 IO.mapRequired("ilocalsym", LoadCommand.ilocalsym); in mapping()
342 IO.mapRequired("nlocalsym", LoadCommand.nlocalsym); in mapping()
343 IO.mapRequired("iextdefsym", LoadCommand.iextdefsym); in mapping()
344 IO.mapRequired("nextdefsym", LoadCommand.nextdefsym); in mapping()
345 IO.mapRequired("iundefsym", LoadCommand.iundefsym); in mapping()
346 IO.mapRequired("nundefsym", LoadCommand.nundefsym); in mapping()
347 IO.mapRequired("tocoff", LoadCommand.tocoff); in mapping()
348 IO.mapRequired("ntoc", LoadCommand.ntoc); in mapping()
349 IO.mapRequired("modtaboff", LoadCommand.modtaboff); in mapping()
350 IO.mapRequired("nmodtab", LoadCommand.nmodtab); in mapping()
351 IO.mapRequired("extrefsymoff", LoadCommand.extrefsymoff); in mapping()
352 IO.mapRequired("nextrefsyms", LoadCommand.nextrefsyms); in mapping()
353 IO.mapRequired("indirectsymoff", LoadCommand.indirectsymoff); in mapping()
354 IO.mapRequired("nindirectsyms", LoadCommand.nindirectsyms); in mapping()
355 IO.mapRequired("extreloff", LoadCommand.extreloff); in mapping()
356 IO.mapRequired("nextrel", LoadCommand.nextrel); in mapping()
357 IO.mapRequired("locreloff", LoadCommand.locreloff); in mapping()
358 IO.mapRequired("nlocrel", LoadCommand.nlocrel); in mapping()
362 IO &IO, MachO::encryption_info_command &LoadCommand) { in mapping() argument
363 IO.mapRequired("cryptoff", LoadCommand.cryptoff); in mapping()
364 IO.mapRequired("cryptsize", LoadCommand.cryptsize); in mapping()
365 IO.mapRequired("cryptid", LoadCommand.cryptid); in mapping()
369 IO &IO, MachO::encryption_info_command_64 &LoadCommand) { in mapping() argument
370 IO.mapRequired("cryptoff", LoadCommand.cryptoff); in mapping()
371 IO.mapRequired("cryptsize", LoadCommand.cryptsize); in mapping()
372 IO.mapRequired("cryptid", LoadCommand.cryptid); in mapping()
373 IO.mapRequired("pad", LoadCommand.pad); in mapping()
377 IO &IO, MachO::entry_point_command &LoadCommand) { in mapping() argument
378 IO.mapRequired("entryoff", LoadCommand.entryoff); in mapping()
379 IO.mapRequired("stacksize", LoadCommand.stacksize); in mapping()
383 IO &IO, MachO::fvmfile_command &LoadCommand) { in mapping() argument
384 IO.mapRequired("name", LoadCommand.name); in mapping()
385 IO.mapRequired("header_addr", LoadCommand.header_addr); in mapping()
388 void MappingTraits<MachO::fvmlib>::mapping(IO &IO, MachO::fvmlib &FVMLib) { in mapping() argument
389 IO.mapRequired("name", FVMLib.name); in mapping()
390 IO.mapRequired("minor_version", FVMLib.minor_version); in mapping()
391 IO.mapRequired("header_addr", FVMLib.header_addr); in mapping()
395 IO &IO, MachO::fvmlib_command &LoadCommand) { in mapping() argument
396 IO.mapRequired("fvmlib", LoadCommand.fvmlib); in mapping()
400 IO &IO, MachO::ident_command &LoadCommand) {} in mapping() argument
403 IO &IO, MachO::linkedit_data_command &LoadCommand) { in mapping() argument
404 IO.mapRequired("dataoff", LoadCommand.dataoff); in mapping()
405 IO.mapRequired("datasize", LoadCommand.datasize); in mapping()
409 IO &IO, MachO::linker_option_command &LoadCommand) { in mapping() argument
410 IO.mapRequired("count", LoadCommand.count); in mapping()
414 IO &IO, MachO::prebind_cksum_command &LoadCommand) { in mapping() argument
415 IO.mapRequired("cksum", LoadCommand.cksum); in mapping()
419 IO &IO, MachO::load_command &LoadCommand) {} in mapping() argument
422 IO &IO, MachO::prebound_dylib_command &LoadCommand) { in mapping() argument
423 IO.mapRequired("name", LoadCommand.name); in mapping()
424 IO.mapRequired("nmodules", LoadCommand.nmodules); in mapping()
425 IO.mapRequired("linked_modules", LoadCommand.linked_modules); in mapping()
429 IO &IO, MachO::routines_command &LoadCommand) { in mapping() argument
430 IO.mapRequired("init_address", LoadCommand.init_address); in mapping()
431 IO.mapRequired("init_module", LoadCommand.init_module); in mapping()
432 IO.mapRequired("reserved1", LoadCommand.reserved1); in mapping()
433 IO.mapRequired("reserved2", LoadCommand.reserved2); in mapping()
434 IO.mapRequired("reserved3", LoadCommand.reserved3); in mapping()
435 IO.mapRequired("reserved4", LoadCommand.reserved4); in mapping()
436 IO.mapRequired("reserved5", LoadCommand.reserved5); in mapping()
437 IO.mapRequired("reserved6", LoadCommand.reserved6); in mapping()
441 IO &IO, MachO::routines_command_64 &LoadCommand) { in mapping() argument
442 IO.mapRequired("init_address", LoadCommand.init_address); in mapping()
443 IO.mapRequired("init_module", LoadCommand.init_module); in mapping()
444 IO.mapRequired("reserved1", LoadCommand.reserved1); in mapping()
445 IO.mapRequired("reserved2", LoadCommand.reserved2); in mapping()
446 IO.mapRequired("reserved3", LoadCommand.reserved3); in mapping()
447 IO.mapRequired("reserved4", LoadCommand.reserved4); in mapping()
448 IO.mapRequired("reserved5", LoadCommand.reserved5); in mapping()
449 IO.mapRequired("reserved6", LoadCommand.reserved6); in mapping()
453 IO &IO, MachO::rpath_command &LoadCommand) { in mapping() argument
454 IO.mapRequired("path", LoadCommand.path); in mapping()
457 void MappingTraits<MachO::section>::mapping(IO &IO, MachO::section &Section) { in mapping() argument
458 IO.mapRequired("sectname", Section.sectname); in mapping()
459 IO.mapRequired("segname", Section.segname); in mapping()
460 IO.mapRequired("addr", Section.addr); in mapping()
461 IO.mapRequired("size", Section.size); in mapping()
462 IO.mapRequired("offset", Section.offset); in mapping()
463 IO.mapRequired("align", Section.align); in mapping()
464 IO.mapRequired("reloff", Section.reloff); in mapping()
465 IO.mapRequired("nreloc", Section.nreloc); in mapping()
466 IO.mapRequired("flags", Section.flags); in mapping()
467 IO.mapRequired("reserved1", Section.reserved1); in mapping()
468 IO.mapRequired("reserved2", Section.reserved2); in mapping()
471 void MappingTraits<MachO::section_64>::mapping(IO &IO, in mapping() argument
473 IO.mapRequired("sectname", Section.sectname); in mapping()
474 IO.mapRequired("segname", Section.segname); in mapping()
475 IO.mapRequired("addr", Section.addr); in mapping()
476 IO.mapRequired("size", Section.size); in mapping()
477 IO.mapRequired("offset", Section.offset); in mapping()
478 IO.mapRequired("align", Section.align); in mapping()
479 IO.mapRequired("reloff", Section.reloff); in mapping()
480 IO.mapRequired("nreloc", Section.nreloc); in mapping()
481 IO.mapRequired("flags", Section.flags); in mapping()
482 IO.mapRequired("reserved1", Section.reserved1); in mapping()
483 IO.mapRequired("reserved2", Section.reserved2); in mapping()
484 IO.mapRequired("reserved3", Section.reserved3); in mapping()
488 IO &IO, MachO::segment_command &LoadCommand) { in mapping() argument
489 IO.mapRequired("segname", LoadCommand.segname); in mapping()
490 IO.mapRequired("vmaddr", LoadCommand.vmaddr); in mapping()
491 IO.mapRequired("vmsize", LoadCommand.vmsize); in mapping()
492 IO.mapRequired("fileoff", LoadCommand.fileoff); in mapping()
493 IO.mapRequired("filesize", LoadCommand.filesize); in mapping()
494 IO.mapRequired("maxprot", LoadCommand.maxprot); in mapping()
495 IO.mapRequired("initprot", LoadCommand.initprot); in mapping()
496 IO.mapRequired("nsects", LoadCommand.nsects); in mapping()
497 IO.mapRequired("flags", LoadCommand.flags); in mapping()
501 IO &IO, MachO::segment_command_64 &LoadCommand) { in mapping() argument
502 IO.mapRequired("segname", LoadCommand.segname); in mapping()
503 IO.mapRequired("vmaddr", LoadCommand.vmaddr); in mapping()
504 IO.mapRequired("vmsize", LoadCommand.vmsize); in mapping()
505 IO.mapRequired("fileoff", LoadCommand.fileoff); in mapping()
506 IO.mapRequired("filesize", LoadCommand.filesize); in mapping()
507 IO.mapRequired("maxprot", LoadCommand.maxprot); in mapping()
508 IO.mapRequired("initprot", LoadCommand.initprot); in mapping()
509 IO.mapRequired("nsects", LoadCommand.nsects); in mapping()
510 IO.mapRequired("flags", LoadCommand.flags); in mapping()
514 IO &IO, MachO::source_version_command &LoadCommand) { in mapping() argument
515 IO.mapRequired("version", LoadCommand.version); in mapping()
519 IO &IO, MachO::sub_client_command &LoadCommand) { in mapping() argument
520 IO.mapRequired("client", LoadCommand.client); in mapping()
524 IO &IO, MachO::sub_framework_command &LoadCommand) { in mapping() argument
525 IO.mapRequired("umbrella", LoadCommand.umbrella); in mapping()
529 IO &IO, MachO::sub_library_command &LoadCommand) { in mapping() argument
530 IO.mapRequired("sub_library", LoadCommand.sub_library); in mapping()
534 IO &IO, MachO::sub_umbrella_command &LoadCommand) { in mapping() argument
535 IO.mapRequired("sub_umbrella", LoadCommand.sub_umbrella); in mapping()
539 IO &IO, MachO::symseg_command &LoadCommand) { in mapping() argument
540 IO.mapRequired("offset", LoadCommand.offset); in mapping()
541 IO.mapRequired("size", LoadCommand.size); in mapping()
545 IO &IO, MachO::symtab_command &LoadCommand) { in mapping() argument
546 IO.mapRequired("symoff", LoadCommand.symoff); in mapping()
547 IO.mapRequired("nsyms", LoadCommand.nsyms); in mapping()
548 IO.mapRequired("stroff", LoadCommand.stroff); in mapping()
549 IO.mapRequired("strsize", LoadCommand.strsize); in mapping()
553 IO &IO, MachO::thread_command &LoadCommand) {} in mapping() argument
556 IO &IO, MachO::twolevel_hints_command &LoadCommand) { in mapping() argument
557 IO.mapRequired("offset", LoadCommand.offset); in mapping()
558 IO.mapRequired("nhints", LoadCommand.nhints); in mapping()
562 IO &IO, MachO::uuid_command &LoadCommand) { in mapping() argument
563 IO.mapRequired("uuid", LoadCommand.uuid); in mapping()
567 IO &IO, MachO::version_min_command &LoadCommand) { in mapping() argument
568 IO.mapRequired("version", LoadCommand.version); in mapping()
569 IO.mapRequired("sdk", LoadCommand.sdk); in mapping()
573 IO &IO, MachO::note_command &LoadCommand) { in mapping() argument
574 IO.mapRequired("data_owner", LoadCommand.data_owner); in mapping()
575 IO.mapRequired("offset", LoadCommand.offset); in mapping()
576 IO.mapRequired("size", LoadCommand.size); in mapping()
580 IO &IO, MachO::build_version_command &LoadCommand) { in mapping() argument
581 IO.mapRequired("platform", LoadCommand.platform); in mapping()
582 IO.mapRequired("minos", LoadCommand.minos); in mapping()
583 IO.mapRequired("sdk", LoadCommand.sdk); in mapping()
584 IO.mapRequired("ntools", LoadCommand.ntools); in mapping()