Lines Matching refs:Command
283 for (const auto &Command : MachOObj->load_commands()) {
284 if (Command.C.cmd == MachO::LC_FUNCTION_STARTS) {
288 MachOObj->getLinkeditDataLoadCommand(Command);
291 } else if (Command.C.cmd == MachO::LC_SEGMENT) {
292 MachO::segment_command SLC = MachOObj->getSegmentLoadCommand(Command);
564 outs() << "command " << Index++ << "\n";
1155 // command line options.
1463 // called to process the file based on the command line options.
2447 // entries off the dynamic symtab command. For these the r_offset is from the
5991 // FIXME: Using the -cfg command line option, this code used to be able to
7859 llvm_unreachable("Unknown version min load command");
8524 for (const auto &Command : Obj->load_commands()) {
8525 outs() << "Load command " << Index++ << "\n";
8526 if (Command.C.cmd == MachO::LC_SEGMENT) {
8527 MachO::segment_command SLC = Obj->getSegmentLoadCommand(Command);
8534 MachO::section S = Obj->getSection(Command, j);
8539 } else if (Command.C.cmd == MachO::LC_SEGMENT_64) {
8540 MachO::segment_command_64 SLC_64 = Obj->getSegment64LoadCommand(Command);
8547 MachO::section_64 S_64 = Obj->getSection64(Command, j);
8553 } else if (Command.C.cmd == MachO::LC_SYMTAB) {
8556 } else if (Command.C.cmd == MachO::LC_DYSYMTAB) {
8561 } else if (Command.C.cmd == MachO::LC_DYLD_INFO ||
8562 Command.C.cmd == MachO::LC_DYLD_INFO_ONLY) {
8563 MachO::dyld_info_command DyldInfo = Obj->getDyldInfoLoadCommand(Command);
8565 } else if (Command.C.cmd == MachO::LC_LOAD_DYLINKER ||
8566 Command.C.cmd == MachO::LC_ID_DYLINKER ||
8567 Command.C.cmd == MachO::LC_DYLD_ENVIRONMENT) {
8568 MachO::dylinker_command Dyld = Obj->getDylinkerCommand(Command);
8569 PrintDyldLoadCommand(Dyld, Command.Ptr);
8570 } else if (Command.C.cmd == MachO::LC_UUID) {
8571 MachO::uuid_command Uuid = Obj->getUuidCommand(Command);
8573 } else if (Command.C.cmd == MachO::LC_RPATH) {
8574 MachO::rpath_command Rpath = Obj->getRpathCommand(Command);
8575 PrintRpathLoadCommand(Rpath, Command.Ptr);
8576 } else if (Command.C.cmd == MachO::LC_VERSION_MIN_MACOSX ||
8577 Command.C.cmd == MachO::LC_VERSION_MIN_IPHONEOS ||
8578 Command.C.cmd == MachO::LC_VERSION_MIN_TVOS ||
8579 Command.C.cmd == MachO::LC_VERSION_MIN_WATCHOS) {
8580 MachO::version_min_command Vd = Obj->getVersionMinLoadCommand(Command);
8582 } else if (Command.C.cmd == MachO::LC_SOURCE_VERSION) {
8583 MachO::source_version_command Sd = Obj->getSourceVersionCommand(Command);
8585 } else if (Command.C.cmd == MachO::LC_MAIN) {
8586 MachO::entry_point_command Ep = Obj->getEntryPointCommand(Command);
8588 } else if (Command.C.cmd == MachO::LC_ENCRYPTION_INFO) {
8590 Obj->getEncryptionInfoCommand(Command);
8592 } else if (Command.C.cmd == MachO::LC_ENCRYPTION_INFO_64) {
8594 Obj->getEncryptionInfoCommand64(Command);
8596 } else if (Command.C.cmd == MachO::LC_LINKER_OPTION) {
8598 Obj->getLinkerOptionLoadCommand(Command);
8599 PrintLinkerOptionCommand(Lo, Command.Ptr);
8600 } else if (Command.C.cmd == MachO::LC_SUB_FRAMEWORK) {
8601 MachO::sub_framework_command Sf = Obj->getSubFrameworkCommand(Command);
8602 PrintSubFrameworkCommand(Sf, Command.Ptr);
8603 } else if (Command.C.cmd == MachO::LC_SUB_UMBRELLA) {
8604 MachO::sub_umbrella_command Sf = Obj->getSubUmbrellaCommand(Command);
8605 PrintSubUmbrellaCommand(Sf, Command.Ptr);
8606 } else if (Command.C.cmd == MachO::LC_SUB_LIBRARY) {
8607 MachO::sub_library_command Sl = Obj->getSubLibraryCommand(Command);
8608 PrintSubLibraryCommand(Sl, Command.Ptr);
8609 } else if (Command.C.cmd == MachO::LC_SUB_CLIENT) {
8610 MachO::sub_client_command Sc = Obj->getSubClientCommand(Command);
8611 PrintSubClientCommand(Sc, Command.Ptr);
8612 } else if (Command.C.cmd == MachO::LC_ROUTINES) {
8613 MachO::routines_command Rc = Obj->getRoutinesCommand(Command);
8615 } else if (Command.C.cmd == MachO::LC_ROUTINES_64) {
8616 MachO::routines_command_64 Rc = Obj->getRoutinesCommand64(Command);
8618 } else if (Command.C.cmd == MachO::LC_THREAD ||
8619 Command.C.cmd == MachO::LC_UNIXTHREAD) {
8620 MachO::thread_command Tc = Obj->getThreadCommand(Command);
8621 PrintThreadCommand(Tc, Command.Ptr, Obj->isLittleEndian(), cputype);
8622 } else if (Command.C.cmd == MachO::LC_LOAD_DYLIB ||
8623 Command.C.cmd == MachO::LC_ID_DYLIB ||
8624 Command.C.cmd == MachO::LC_LOAD_WEAK_DYLIB ||
8625 Command.C.cmd == MachO::LC_REEXPORT_DYLIB ||
8626 Command.C.cmd == MachO::LC_LAZY_LOAD_DYLIB ||
8627 Command.C.cmd == MachO::LC_LOAD_UPWARD_DYLIB) {
8628 MachO::dylib_command Dl = Obj->getDylibIDLoadCommand(Command);
8629 PrintDylibCommand(Dl, Command.Ptr);
8630 } else if (Command.C.cmd == MachO::LC_CODE_SIGNATURE ||
8631 Command.C.cmd == MachO::LC_SEGMENT_SPLIT_INFO ||
8632 Command.C.cmd == MachO::LC_FUNCTION_STARTS ||
8633 Command.C.cmd == MachO::LC_DATA_IN_CODE ||
8634 Command.C.cmd == MachO::LC_DYLIB_CODE_SIGN_DRS ||
8635 Command.C.cmd == MachO::LC_LINKER_OPTIMIZATION_HINT) {
8637 Obj->getLinkeditDataLoadCommand(Command);
8640 outs() << " cmd ?(" << format("0x%08" PRIx32, Command.C.cmd)
8642 outs() << " cmdsize " << Command.C.cmdsize << "\n";
8643 // TODO: get and print the raw bytes of the load command.