• Home
  • Raw
  • Download

Lines Matching refs:MachO

76     MachO::swapStruct(Cmd);  in getStruct()
89 MachO::swapStruct(Cmd); in getStructOrErr()
99 unsigned SegmentLoadSize = Is64 ? sizeof(MachO::segment_command_64) : in getSectionPtr()
100 sizeof(MachO::segment_command); in getSectionPtr()
101 unsigned SectionSize = Is64 ? sizeof(MachO::section_64) : in getSectionPtr()
102 sizeof(MachO::section); in getSectionPtr()
113 static MachO::nlist_base
116 return getStruct<MachO::nlist_base>(O, P); in getSymbolTableEntryBase()
136 getPlainRelocationAddress(const MachO::any_relocation_info &RE) { in getPlainRelocationAddress()
141 getScatteredRelocationAddress(const MachO::any_relocation_info &RE) { in getScatteredRelocationAddress()
146 const MachO::any_relocation_info &RE) { in getPlainRelocationPCRel()
153 getScatteredRelocationPCRel(const MachO::any_relocation_info &RE) { in getScatteredRelocationPCRel()
158 const MachO::any_relocation_info &RE) { in getPlainRelocationLength()
165 getScatteredRelocationLength(const MachO::any_relocation_info &RE) { in getScatteredRelocationLength()
170 const MachO::any_relocation_info &RE) { in getPlainRelocationType()
179 MachO::section_64 Sect = O.getSection64(Sec); in getSectionFlags()
182 MachO::section Sect = O.getSection(Sec); in getSectionFlags()
189 if (auto CmdOrErr = getStructOrErr<MachO::load_command>(Obj, Ptr)) { in getLoadCommandInfo()
203 unsigned HeaderSize = Obj.is64Bit() ? sizeof(MachO::mach_header_64) in getFirstLoadCommandInfo()
204 : sizeof(MachO::mach_header); in getFirstLoadCommandInfo()
205 if (sizeof(MachO::load_command) > Obj.getHeader().sizeofcmds) in getFirstLoadCommandInfo()
214 unsigned HeaderSize = Obj.is64Bit() ? sizeof(MachO::mach_header_64) in getNextLoadCommandInfo()
215 : sizeof(MachO::mach_header); in getNextLoadCommandInfo()
216 if (L.Ptr + L.C.cmdsize + sizeof(MachO::load_command) > in getNextLoadCommandInfo()
302 if (Obj.getHeader().filetype != MachO::MH_DYLIB_STUB && in parseSegmentLoadCommand()
303 Obj.getHeader().filetype != MachO::MH_DSYM && in parseSegmentLoadCommand()
304 s.flags != MachO::S_ZEROFILL && in parseSegmentLoadCommand()
305 s.flags != MachO::S_THREAD_LOCAL_ZEROFILL && in parseSegmentLoadCommand()
310 if (Obj.getHeader().filetype != MachO::MH_DYLIB_STUB && in parseSegmentLoadCommand()
311 Obj.getHeader().filetype != MachO::MH_DSYM && in parseSegmentLoadCommand()
312 s.flags != MachO::S_ZEROFILL && in parseSegmentLoadCommand()
313 s.flags != MachO::S_THREAD_LOCAL_ZEROFILL && S.fileoff == 0 && in parseSegmentLoadCommand()
320 if (Obj.getHeader().filetype != MachO::MH_DYLIB_STUB && in parseSegmentLoadCommand()
321 Obj.getHeader().filetype != MachO::MH_DSYM && in parseSegmentLoadCommand()
322 s.flags != MachO::S_ZEROFILL && in parseSegmentLoadCommand()
323 s.flags != MachO::S_THREAD_LOCAL_ZEROFILL && in parseSegmentLoadCommand()
329 if (Obj.getHeader().filetype != MachO::MH_DYLIB_STUB && in parseSegmentLoadCommand()
330 Obj.getHeader().filetype != MachO::MH_DSYM && in parseSegmentLoadCommand()
331 s.flags != MachO::S_ZEROFILL && in parseSegmentLoadCommand()
332 s.flags != MachO::S_THREAD_LOCAL_ZEROFILL && in parseSegmentLoadCommand()
338 if (Obj.getHeader().filetype != MachO::MH_DYLIB_STUB && in parseSegmentLoadCommand()
339 Obj.getHeader().filetype != MachO::MH_DSYM && s.size != 0 && in parseSegmentLoadCommand()
354 if (Obj.getHeader().filetype != MachO::MH_DYLIB_STUB && in parseSegmentLoadCommand()
355 Obj.getHeader().filetype != MachO::MH_DSYM && in parseSegmentLoadCommand()
356 s.flags != MachO::S_ZEROFILL && in parseSegmentLoadCommand()
357 s.flags != MachO::S_THREAD_LOCAL_ZEROFILL) in parseSegmentLoadCommand()
366 BigSize *= sizeof(struct MachO::relocation_info); in parseSegmentLoadCommand()
376 MachO::relocation_info), in parseSegmentLoadCommand()
406 if (Load.C.cmdsize < sizeof(MachO::symtab_command)) in checkSymtabCommand()
411 auto SymtabOrErr = getStructOrErr<MachO::symtab_command>(Obj, Load.Ptr); in checkSymtabCommand()
414 MachO::symtab_command Symtab = SymtabOrErr.get(); in checkSymtabCommand()
415 if (Symtab.cmdsize != sizeof(MachO::symtab_command)) in checkSymtabCommand()
426 SymtabSize *= sizeof(MachO::nlist_64); in checkSymtabCommand()
429 SymtabSize *= sizeof(MachO::nlist); in checkSymtabCommand()
464 if (Load.C.cmdsize < sizeof(MachO::dysymtab_command)) in checkDysymtabCommand()
470 getStructOrErr<MachO::dysymtab_command>(Obj, Load.Ptr); in checkDysymtabCommand()
473 MachO::dysymtab_command Dysymtab = DysymtabOrErr.get(); in checkDysymtabCommand()
474 if (Dysymtab.cmdsize != sizeof(MachO::dysymtab_command)) in checkDysymtabCommand()
483 BigSize *= sizeof(MachO::dylib_table_of_contents); in checkDysymtabCommand()
492 MachO::dylib_table_of_contents), in checkDysymtabCommand()
503 sizeof_modtab = sizeof(MachO::dylib_module_64); in checkDysymtabCommand()
506 sizeof_modtab = sizeof(MachO::dylib_module); in checkDysymtabCommand()
525 BigSize *= sizeof(MachO::dylib_reference); in checkDysymtabCommand()
534 sizeof(MachO::dylib_reference), in checkDysymtabCommand()
559 BigSize *= sizeof(MachO::relocation_info); in checkDysymtabCommand()
568 sizeof(MachO::relocation_info), in checkDysymtabCommand()
576 BigSize *= sizeof(MachO::relocation_info); in checkDysymtabCommand()
585 sizeof(MachO::relocation_info), in checkDysymtabCommand()
598 if (Load.C.cmdsize < sizeof(MachO::linkedit_data_command)) in checkLinkeditDataCommand()
604 getStructOrErr<MachO::linkedit_data_command>(Obj, Load.Ptr); in checkLinkeditDataCommand()
607 MachO::linkedit_data_command LinkData = LinkDataOrError.get(); in checkLinkeditDataCommand()
608 if (LinkData.cmdsize != sizeof(MachO::linkedit_data_command)) in checkLinkeditDataCommand()
635 if (Load.C.cmdsize < sizeof(MachO::dyld_info_command)) in checkDyldInfoCommand()
642 getStructOrErr<MachO::dyld_info_command>(Obj, Load.Ptr); in checkDyldInfoCommand()
645 MachO::dyld_info_command DyldInfo = DyldInfoOrErr.get(); in checkDyldInfoCommand()
646 if (DyldInfo.cmdsize != sizeof(MachO::dyld_info_command)) in checkDyldInfoCommand()
732 if (Load.C.cmdsize < sizeof(MachO::dylib_command)) in checkDylibCommand()
735 auto CommandOrErr = getStructOrErr<MachO::dylib_command>(Obj, Load.Ptr); in checkDylibCommand()
738 MachO::dylib_command D = CommandOrErr.get(); in checkDylibCommand()
739 if (D.dylib.name < sizeof(MachO::dylib_command)) in checkDylibCommand()
770 if (Obj.getHeader().filetype != MachO::MH_DYLIB && in checkDylibIdCommand()
771 Obj.getHeader().filetype != MachO::MH_DYLIB_STUB) in checkDylibIdCommand()
781 if (Load.C.cmdsize < sizeof(MachO::dylinker_command)) in checkDyldCommand()
784 auto CommandOrErr = getStructOrErr<MachO::dylinker_command>(Obj, Load.Ptr); in checkDyldCommand()
787 MachO::dylinker_command D = CommandOrErr.get(); in checkDyldCommand()
788 if (D.name < sizeof(MachO::dylinker_command)) in checkDyldCommand()
814 if (Load.C.cmdsize != sizeof(MachO::version_min_command)) in checkVersCommand()
829 if (Load.C.cmdsize != sizeof(MachO::note_command)) in checkNoteCommand()
832 auto NoteCmdOrErr = getStructOrErr<MachO::note_command>(Obj, Load.Ptr); in checkNoteCommand()
835 MachO::note_command Nt = NoteCmdOrErr.get(); in checkNoteCommand()
859 getStructOrErr<MachO::build_version_command>(Obj, Load.Ptr); in parseBuildVersionCommand()
862 MachO::build_version_command BVC = BVCOrErr.get(); in parseBuildVersionCommand()
864 sizeof(MachO::build_version_command) + in parseBuildVersionCommand()
865 BVC.ntools * sizeof(MachO::build_tool_version)) in parseBuildVersionCommand()
869 auto Start = Load.Ptr + sizeof(MachO::build_version_command); in parseBuildVersionCommand()
872 BuildTools[i] = Start + i * sizeof(MachO::build_tool_version); in parseBuildVersionCommand()
880 if (Load.C.cmdsize < sizeof(MachO::rpath_command)) in checkRpathCommand()
883 auto ROrErr = getStructOrErr<MachO::rpath_command>(Obj, Load.Ptr); in checkRpathCommand()
886 MachO::rpath_command R = ROrErr.get(); in checkRpathCommand()
887 if (R.path < sizeof(MachO::rpath_command)) in checkRpathCommand()
936 if (Load.C.cmdsize < sizeof(MachO::linker_option_command)) in checkLinkerOptCommand()
940 getStructOrErr<MachO::linker_option_command>(Obj, Load.Ptr); in checkLinkerOptCommand()
943 MachO::linker_option_command L = LinkOptionOrErr.get(); in checkLinkerOptCommand()
946 sizeof(struct MachO::linker_option_command); in checkLinkerOptCommand()
947 uint32_t left = L.cmdsize - sizeof(struct MachO::linker_option_command); in checkLinkerOptCommand()
1004 if (Load.C.cmdsize < sizeof(MachO::thread_command)) in checkThreadCommand()
1008 getStructOrErr<MachO::thread_command>(Obj, Load.Ptr); in checkThreadCommand()
1011 MachO::thread_command T = ThreadCommandOrErr.get(); in checkThreadCommand()
1012 const char *state = Load.Ptr + sizeof(MachO::thread_command); in checkThreadCommand()
1037 if (cputype == MachO::CPU_TYPE_I386) { in checkThreadCommand()
1038 if (flavor == MachO::x86_THREAD_STATE32) { in checkThreadCommand()
1039 if (count != MachO::x86_THREAD_STATE32_COUNT) in checkThreadCommand()
1045 if (state + sizeof(MachO::x86_thread_state32_t) > end) in checkThreadCommand()
1049 state += sizeof(MachO::x86_thread_state32_t); in checkThreadCommand()
1056 } else if (cputype == MachO::CPU_TYPE_X86_64) { in checkThreadCommand()
1057 if (flavor == MachO::x86_THREAD_STATE) { in checkThreadCommand()
1058 if (count != MachO::x86_THREAD_STATE_COUNT) in checkThreadCommand()
1064 if (state + sizeof(MachO::x86_thread_state_t) > end) in checkThreadCommand()
1068 state += sizeof(MachO::x86_thread_state_t); in checkThreadCommand()
1069 } else if (flavor == MachO::x86_FLOAT_STATE) { in checkThreadCommand()
1070 if (count != MachO::x86_FLOAT_STATE_COUNT) in checkThreadCommand()
1076 if (state + sizeof(MachO::x86_float_state_t) > end) in checkThreadCommand()
1080 state += sizeof(MachO::x86_float_state_t); in checkThreadCommand()
1081 } else if (flavor == MachO::x86_EXCEPTION_STATE) { in checkThreadCommand()
1082 if (count != MachO::x86_EXCEPTION_STATE_COUNT) in checkThreadCommand()
1088 if (state + sizeof(MachO::x86_exception_state_t) > end) in checkThreadCommand()
1092 state += sizeof(MachO::x86_exception_state_t); in checkThreadCommand()
1093 } else if (flavor == MachO::x86_THREAD_STATE64) { in checkThreadCommand()
1094 if (count != MachO::x86_THREAD_STATE64_COUNT) in checkThreadCommand()
1100 if (state + sizeof(MachO::x86_thread_state64_t) > end) in checkThreadCommand()
1104 state += sizeof(MachO::x86_thread_state64_t); in checkThreadCommand()
1105 } else if (flavor == MachO::x86_EXCEPTION_STATE64) { in checkThreadCommand()
1106 if (count != MachO::x86_EXCEPTION_STATE64_COUNT) in checkThreadCommand()
1112 if (state + sizeof(MachO::x86_exception_state64_t) > end) in checkThreadCommand()
1116 state += sizeof(MachO::x86_exception_state64_t); in checkThreadCommand()
1123 } else if (cputype == MachO::CPU_TYPE_ARM) { in checkThreadCommand()
1124 if (flavor == MachO::ARM_THREAD_STATE) { in checkThreadCommand()
1125 if (count != MachO::ARM_THREAD_STATE_COUNT) in checkThreadCommand()
1131 if (state + sizeof(MachO::arm_thread_state32_t) > end) in checkThreadCommand()
1135 state += sizeof(MachO::arm_thread_state32_t); in checkThreadCommand()
1142 } else if (cputype == MachO::CPU_TYPE_ARM64 || in checkThreadCommand()
1143 cputype == MachO::CPU_TYPE_ARM64_32) { in checkThreadCommand()
1144 if (flavor == MachO::ARM_THREAD_STATE64) { in checkThreadCommand()
1145 if (count != MachO::ARM_THREAD_STATE64_COUNT) in checkThreadCommand()
1151 if (state + sizeof(MachO::arm_thread_state64_t) > end) in checkThreadCommand()
1155 state += sizeof(MachO::arm_thread_state64_t); in checkThreadCommand()
1162 } else if (cputype == MachO::CPU_TYPE_POWERPC) { in checkThreadCommand()
1163 if (flavor == MachO::PPC_THREAD_STATE) { in checkThreadCommand()
1164 if (count != MachO::PPC_THREAD_STATE_COUNT) in checkThreadCommand()
1170 if (state + sizeof(MachO::ppc_thread_state32_t) > end) in checkThreadCommand()
1174 state += sizeof(MachO::ppc_thread_state32_t); in checkThreadCommand()
1197 if (Load.C.cmdsize != sizeof(MachO::twolevel_hints_command)) in checkTwoLevelHintsCommand()
1202 auto HintsOrErr = getStructOrErr<MachO::twolevel_hints_command>(Obj, Load.Ptr); in checkTwoLevelHintsCommand()
1205 MachO::twolevel_hints_command Hints = HintsOrErr.get(); in checkTwoLevelHintsCommand()
1212 BigSize *= sizeof(MachO::twolevel_hint); in checkTwoLevelHintsCommand()
1220 sizeof(MachO::twolevel_hint), in checkTwoLevelHintsCommand()
1231 if (cmd == MachO::LC_SYMSEG || in isLoadCommandObsolete()
1232 cmd == MachO::LC_LOADFVMLIB || in isLoadCommandObsolete()
1233 cmd == MachO::LC_IDFVMLIB || in isLoadCommandObsolete()
1234 cmd == MachO::LC_IDENT || in isLoadCommandObsolete()
1235 cmd == MachO::LC_FVMFILE || in isLoadCommandObsolete()
1236 cmd == MachO::LC_PREPAGE || in isLoadCommandObsolete()
1237 cmd == MachO::LC_PREBOUND_DYLIB || in isLoadCommandObsolete()
1238 cmd == MachO::LC_TWOLEVEL_HINTS || in isLoadCommandObsolete()
1239 cmd == MachO::LC_PREBIND_CKSUM) in isLoadCommandObsolete()
1268 SizeOfHeaders = sizeof(MachO::mach_header_64); in MachOObjectFile()
1272 SizeOfHeaders = sizeof(MachO::mach_header); in MachOObjectFile()
1320 if (getHeader().filetype != MachO::MH_CORE || in MachOObjectFile()
1321 Load.C.cmd != MachO::LC_THREAD || Load.C.cmdsize % 4) { in MachOObjectFile()
1335 if (Load.C.cmd == MachO::LC_SYMTAB) { in MachOObjectFile()
1338 } else if (Load.C.cmd == MachO::LC_DYSYMTAB) { in MachOObjectFile()
1342 } else if (Load.C.cmd == MachO::LC_DATA_IN_CODE) { in MachOObjectFile()
1347 } else if (Load.C.cmd == MachO::LC_LINKER_OPTIMIZATION_HINT) { in MachOObjectFile()
1353 } else if (Load.C.cmd == MachO::LC_FUNCTION_STARTS) { in MachOObjectFile()
1358 } else if (Load.C.cmd == MachO::LC_SEGMENT_SPLIT_INFO) { in MachOObjectFile()
1363 } else if (Load.C.cmd == MachO::LC_DYLIB_CODE_SIGN_DRS) { in MachOObjectFile()
1368 } else if (Load.C.cmd == MachO::LC_CODE_SIGNATURE) { in MachOObjectFile()
1373 } else if (Load.C.cmd == MachO::LC_DYLD_INFO) { in MachOObjectFile()
1377 } else if (Load.C.cmd == MachO::LC_DYLD_INFO_ONLY) { in MachOObjectFile()
1381 } else if (Load.C.cmd == MachO::LC_UUID) { in MachOObjectFile()
1382 if (Load.C.cmdsize != sizeof(MachO::uuid_command)) { in MachOObjectFile()
1392 } else if (Load.C.cmd == MachO::LC_SEGMENT_64) { in MachOObjectFile()
1393 if ((Err = parseSegmentLoadCommand<MachO::segment_command_64, in MachOObjectFile()
1394 MachO::section_64>( in MachOObjectFile()
1398 } else if (Load.C.cmd == MachO::LC_SEGMENT) { in MachOObjectFile()
1399 if ((Err = parseSegmentLoadCommand<MachO::segment_command, in MachOObjectFile()
1400 MachO::section>( in MachOObjectFile()
1404 } else if (Load.C.cmd == MachO::LC_ID_DYLIB) { in MachOObjectFile()
1407 } else if (Load.C.cmd == MachO::LC_LOAD_DYLIB) { in MachOObjectFile()
1411 } else if (Load.C.cmd == MachO::LC_LOAD_WEAK_DYLIB) { in MachOObjectFile()
1415 } else if (Load.C.cmd == MachO::LC_LAZY_LOAD_DYLIB) { in MachOObjectFile()
1419 } else if (Load.C.cmd == MachO::LC_REEXPORT_DYLIB) { in MachOObjectFile()
1423 } else if (Load.C.cmd == MachO::LC_LOAD_UPWARD_DYLIB) { in MachOObjectFile()
1427 } else if (Load.C.cmd == MachO::LC_ID_DYLINKER) { in MachOObjectFile()
1430 } else if (Load.C.cmd == MachO::LC_LOAD_DYLINKER) { in MachOObjectFile()
1433 } else if (Load.C.cmd == MachO::LC_DYLD_ENVIRONMENT) { in MachOObjectFile()
1436 } else if (Load.C.cmd == MachO::LC_VERSION_MIN_MACOSX) { in MachOObjectFile()
1440 } else if (Load.C.cmd == MachO::LC_VERSION_MIN_IPHONEOS) { in MachOObjectFile()
1444 } else if (Load.C.cmd == MachO::LC_VERSION_MIN_TVOS) { in MachOObjectFile()
1448 } else if (Load.C.cmd == MachO::LC_VERSION_MIN_WATCHOS) { in MachOObjectFile()
1452 } else if (Load.C.cmd == MachO::LC_NOTE) { in MachOObjectFile()
1455 } else if (Load.C.cmd == MachO::LC_BUILD_VERSION) { in MachOObjectFile()
1458 } else if (Load.C.cmd == MachO::LC_RPATH) { in MachOObjectFile()
1461 } else if (Load.C.cmd == MachO::LC_SOURCE_VERSION) { in MachOObjectFile()
1462 if (Load.C.cmdsize != sizeof(MachO::source_version_command)) { in MachOObjectFile()
1472 } else if (Load.C.cmd == MachO::LC_MAIN) { in MachOObjectFile()
1473 if (Load.C.cmdsize != sizeof(MachO::entry_point_command)) { in MachOObjectFile()
1483 } else if (Load.C.cmd == MachO::LC_ENCRYPTION_INFO) { in MachOObjectFile()
1484 if (Load.C.cmdsize != sizeof(MachO::encryption_info_command)) { in MachOObjectFile()
1489 MachO::encryption_info_command E = in MachOObjectFile()
1490 getStruct<MachO::encryption_info_command>(*this, Load.Ptr); in MachOObjectFile()
1494 } else if (Load.C.cmd == MachO::LC_ENCRYPTION_INFO_64) { in MachOObjectFile()
1495 if (Load.C.cmdsize != sizeof(MachO::encryption_info_command_64)) { in MachOObjectFile()
1500 MachO::encryption_info_command_64 E = in MachOObjectFile()
1501 getStruct<MachO::encryption_info_command_64>(*this, Load.Ptr); in MachOObjectFile()
1505 } else if (Load.C.cmd == MachO::LC_LINKER_OPTION) { in MachOObjectFile()
1508 } else if (Load.C.cmd == MachO::LC_SUB_FRAMEWORK) { in MachOObjectFile()
1509 if (Load.C.cmdsize < sizeof(MachO::sub_framework_command)) { in MachOObjectFile()
1514 MachO::sub_framework_command S = in MachOObjectFile()
1515 getStruct<MachO::sub_framework_command>(*this, Load.Ptr); in MachOObjectFile()
1517 sizeof(MachO::sub_framework_command), in MachOObjectFile()
1521 } else if (Load.C.cmd == MachO::LC_SUB_UMBRELLA) { in MachOObjectFile()
1522 if (Load.C.cmdsize < sizeof(MachO::sub_umbrella_command)) { in MachOObjectFile()
1527 MachO::sub_umbrella_command S = in MachOObjectFile()
1528 getStruct<MachO::sub_umbrella_command>(*this, Load.Ptr); in MachOObjectFile()
1530 sizeof(MachO::sub_umbrella_command), in MachOObjectFile()
1534 } else if (Load.C.cmd == MachO::LC_SUB_LIBRARY) { in MachOObjectFile()
1535 if (Load.C.cmdsize < sizeof(MachO::sub_library_command)) { in MachOObjectFile()
1540 MachO::sub_library_command S = in MachOObjectFile()
1541 getStruct<MachO::sub_library_command>(*this, Load.Ptr); in MachOObjectFile()
1543 sizeof(MachO::sub_library_command), in MachOObjectFile()
1547 } else if (Load.C.cmd == MachO::LC_SUB_CLIENT) { in MachOObjectFile()
1548 if (Load.C.cmdsize < sizeof(MachO::sub_client_command)) { in MachOObjectFile()
1553 MachO::sub_client_command S = in MachOObjectFile()
1554 getStruct<MachO::sub_client_command>(*this, Load.Ptr); in MachOObjectFile()
1556 sizeof(MachO::sub_client_command), in MachOObjectFile()
1559 } else if (Load.C.cmd == MachO::LC_ROUTINES) { in MachOObjectFile()
1560 if (Load.C.cmdsize != sizeof(MachO::routines_command)) { in MachOObjectFile()
1571 } else if (Load.C.cmd == MachO::LC_ROUTINES_64) { in MachOObjectFile()
1572 if (Load.C.cmdsize != sizeof(MachO::routines_command_64)) { in MachOObjectFile()
1583 } else if (Load.C.cmd == MachO::LC_UNIXTHREAD) { in MachOObjectFile()
1591 } else if (Load.C.cmd == MachO::LC_THREAD) { in MachOObjectFile()
1595 } else if (Load.C.cmd == MachO::LC_TWOLEVEL_HINTS) { in MachOObjectFile()
1599 } else if (Load.C.cmd == MachO::LC_IDENT) { in MachOObjectFile()
1627 MachO::symtab_command Symtab = in MachOObjectFile()
1628 getStruct<MachO::symtab_command>(*this, SymtabLoadCmd); in MachOObjectFile()
1629 MachO::dysymtab_command Dysymtab = in MachOObjectFile()
1630 getStruct<MachO::dysymtab_command>(*this, DysymtabLoadCmd); in MachOObjectFile()
1669 if ((getHeader().filetype == MachO::MH_DYLIB || in MachOObjectFile()
1670 getHeader().filetype == MachO::MH_DYLIB_STUB) && in MachOObjectFile()
1684 MachO::mach_header_64 H_64 = MachOObjectFile::getHeader64(); in checkSymbolTable()
1687 MachO::mach_header H = MachOObjectFile::getHeader(); in checkSymbolTable()
1696 MachO::symtab_command S = getSymtabLoadCommand(); in checkSymbolTable()
1700 MachO::nlist_64 STE_64 = getSymbol64TableEntry(SymDRI); in checkSymbolTable()
1707 MachO::nlist STE = getSymbolTableEntry(SymDRI); in checkSymbolTable()
1714 if ((NType & MachO::N_STAB) == 0) { in checkSymbolTable()
1715 if ((NType & MachO::N_TYPE) == MachO::N_SECT) { in checkSymbolTable()
1720 if ((NType & MachO::N_TYPE) == MachO::N_INDR) { in checkSymbolTable()
1726 if ((Flags & MachO::MH_TWOLEVEL) == MachO::MH_TWOLEVEL && in checkSymbolTable()
1727 (((NType & MachO::N_TYPE) == MachO::N_UNDF && NValue == 0) || in checkSymbolTable()
1728 (NType & MachO::N_TYPE) == MachO::N_PBUD)) { in checkSymbolTable()
1729 uint32_t LibraryOrdinal = MachO::GET_LIBRARY_ORDINAL(NDesc); in checkSymbolTable()
1731 LibraryOrdinal != MachO::EXECUTABLE_ORDINAL && in checkSymbolTable()
1732 LibraryOrdinal != MachO::DYNAMIC_LOOKUP_ORDINAL && in checkSymbolTable()
1750 sizeof(MachO::nlist_64) : in moveSymbolNext()
1751 sizeof(MachO::nlist); in moveSymbolNext()
1757 MachO::nlist_base Entry = getSymbolTableEntryBase(*this, Symb); in getSymbolName()
1773 return Flags & MachO::SECTION_TYPE; in getSectionType()
1778 MachO::nlist_64 Entry = getSymbol64TableEntry(Sym); in getNValue()
1781 MachO::nlist Entry = getSymbolTableEntry(Sym); in getNValue()
1790 MachO::nlist_base Entry = getSymbolTableEntryBase(*this, Symb); in getIndirectName()
1791 if ((Entry.n_type & MachO::N_TYPE) != MachO::N_INDR) in getIndirectName()
1812 MachO::nlist_base Entry = getSymbolTableEntryBase(*this, DRI); in getSymbolAlignment()
1813 return 1 << MachO::GET_COMM_ALIGN(Entry.n_desc); in getSymbolAlignment()
1824 MachO::nlist_base Entry = getSymbolTableEntryBase(*this, Symb); in getSymbolType()
1828 if (n_type & MachO::N_STAB) in getSymbolType()
1831 switch (n_type & MachO::N_TYPE) { in getSymbolType()
1832 case MachO::N_UNDF : in getSymbolType()
1834 case MachO::N_SECT : in getSymbolType()
1847 MachO::nlist_base Entry = getSymbolTableEntryBase(*this, DRI); in getSymbolFlags()
1854 if ((MachOType & MachO::N_TYPE) == MachO::N_INDR) in getSymbolFlags()
1857 if (MachOType & MachO::N_STAB) in getSymbolFlags()
1860 if (MachOType & MachO::N_EXT) { in getSymbolFlags()
1862 if ((MachOType & MachO::N_TYPE) == MachO::N_UNDF) { in getSymbolFlags()
1869 if (!(MachOType & MachO::N_PEXT)) in getSymbolFlags()
1873 if (MachOFlags & (MachO::N_WEAK_REF | MachO::N_WEAK_DEF)) in getSymbolFlags()
1876 if (MachOFlags & (MachO::N_ARM_THUMB_DEF)) in getSymbolFlags()
1879 if ((MachOType & MachO::N_TYPE) == MachO::N_ABS) in getSymbolFlags()
1887 MachO::nlist_base Entry = getSymbolTableEntryBase(*this, Symb); in getSymbolSection()
1902 MachO::nlist_base Entry = in getSymbolSectionID()
1935 MachO::section_64 Sect = getSection64(Sec); in getSectionSize()
1938 SectType = Sect.flags & MachO::SECTION_TYPE; in getSectionSize()
1940 MachO::section Sect = getSection(Sec); in getSectionSize()
1943 SectType = Sect.flags & MachO::SECTION_TYPE; in getSectionSize()
1945 if (SectType == MachO::S_ZEROFILL || SectType == MachO::S_GB_ZEROFILL) in getSectionSize()
1966 MachO::section_64 Sect = getSection64(Sec); in getSectionContents()
1970 MachO::section Sect = getSection(Sec); in getSectionContents()
1981 MachO::section_64 Sect = getSection64(Sec); in getSectionAlignment()
1984 MachO::section Sect = getSection(Sec); in getSectionAlignment()
2017 return Flags & MachO::S_ATTR_PURE_INSTRUCTIONS; in isSectionText()
2022 unsigned SectionType = Flags & MachO::SECTION_TYPE; in isSectionData()
2023 return !(Flags & MachO::S_ATTR_PURE_INSTRUCTIONS) && in isSectionData()
2024 !(SectionType == MachO::S_ZEROFILL || in isSectionData()
2025 SectionType == MachO::S_GB_ZEROFILL); in isSectionData()
2030 unsigned SectionType = Flags & MachO::SECTION_TYPE; in isSectionBSS()
2031 return !(Flags & MachO::S_ATTR_PURE_INSTRUCTIONS) && in isSectionBSS()
2032 (SectionType == MachO::S_ZEROFILL || in isSectionBSS()
2033 SectionType == MachO::S_GB_ZEROFILL); in isSectionBSS()
2049 unsigned SectionType = Flags & MachO::SECTION_TYPE; in isSectionVirtual()
2050 return SectionType == MachO::S_ZEROFILL || in isSectionVirtual()
2051 SectionType == MachO::S_GB_ZEROFILL; in isSectionVirtual()
2078 MachO::section_64 Sect = getSection64(Sec); in section_rel_end()
2081 MachO::section Sect = getSection(Sec); in section_rel_end()
2100 MachO::dysymtab_command DysymtabLoadCmd = getDysymtabLoadCommand(); in extrel_end()
2117 MachO::dysymtab_command DysymtabLoadCmd = getDysymtabLoadCommand(); in locrel_end()
2130 assert((getHeader().filetype == MachO::MH_OBJECT || in getRelocationOffset()
2131 getHeader().filetype == MachO::MH_KEXT_BUNDLE) && in getRelocationOffset()
2133 MachO::any_relocation_info RE = getRelocation(Rel); in getRelocationOffset()
2139 MachO::any_relocation_info RE = getRelocation(Rel); in getRelocationSymbol()
2148 MachO::symtab_command S = getSymtabLoadCommand(); in getRelocationSymbol()
2150 sizeof(MachO::nlist_64) : in getRelocationSymbol()
2151 sizeof(MachO::nlist); in getRelocationSymbol()
2164 MachO::any_relocation_info RE = getRelocation(Rel); in getRelocationType()
2279 MachO::any_relocation_info RE = getRelocation(Rel); in getRelocationLength()
2455 getStructOrErr<MachO::dylib_command>(*this, Libraries[i]); in getLibraryShortNameByIndex()
2458 MachO::dylib_command D = CommandOrErr.get(); in getLibraryShortNameByIndex()
2492 MachO::symtab_command Symtab = getSymtabLoadCommand(); in symbol_begin()
2501 MachO::symtab_command Symtab = getSymtabLoadCommand(); in symbol_end()
2506 sizeof(MachO::nlist_64) : in symbol_end()
2507 sizeof(MachO::nlist); in symbol_end()
2515 MachO::symtab_command Symtab = getSymtabLoadCommand(); in getSymbolByIndex()
2519 is64Bit() ? sizeof(MachO::nlist_64) : sizeof(MachO::nlist); in getSymbolByIndex()
2527 MachO::symtab_command Symtab = getSymtabLoadCommand(); in getSymbolIndex()
2531 is64Bit() ? sizeof(MachO::nlist_64) : sizeof(MachO::nlist); in getSymbolIndex()
2557 case MachO::CPU_TYPE_I386: in getFileFormatName()
2559 case MachO::CPU_TYPE_ARM: in getFileFormatName()
2561 case MachO::CPU_TYPE_ARM64_32: in getFileFormatName()
2563 case MachO::CPU_TYPE_POWERPC: in getFileFormatName()
2571 case MachO::CPU_TYPE_X86_64: in getFileFormatName()
2573 case MachO::CPU_TYPE_ARM64: in getFileFormatName()
2575 case MachO::CPU_TYPE_POWERPC64: in getFileFormatName()
2584 case MachO::CPU_TYPE_I386: in getArch()
2586 case MachO::CPU_TYPE_X86_64: in getArch()
2588 case MachO::CPU_TYPE_ARM: in getArch()
2590 case MachO::CPU_TYPE_ARM64: in getArch()
2592 case MachO::CPU_TYPE_ARM64_32: in getArch()
2594 case MachO::CPU_TYPE_POWERPC: in getArch()
2596 case MachO::CPU_TYPE_POWERPC64: in getArch()
2612 case MachO::CPU_TYPE_I386: in getArchTriple()
2613 switch (CPUSubType & ~MachO::CPU_SUBTYPE_MASK) { in getArchTriple()
2614 case MachO::CPU_SUBTYPE_I386_ALL: in getArchTriple()
2621 case MachO::CPU_TYPE_X86_64: in getArchTriple()
2622 switch (CPUSubType & ~MachO::CPU_SUBTYPE_MASK) { in getArchTriple()
2623 case MachO::CPU_SUBTYPE_X86_64_ALL: in getArchTriple()
2627 case MachO::CPU_SUBTYPE_X86_64_H: in getArchTriple()
2634 case MachO::CPU_TYPE_ARM: in getArchTriple()
2635 switch (CPUSubType & ~MachO::CPU_SUBTYPE_MASK) { in getArchTriple()
2636 case MachO::CPU_SUBTYPE_ARM_V4T: in getArchTriple()
2640 case MachO::CPU_SUBTYPE_ARM_V5TEJ: in getArchTriple()
2644 case MachO::CPU_SUBTYPE_ARM_XSCALE: in getArchTriple()
2648 case MachO::CPU_SUBTYPE_ARM_V6: in getArchTriple()
2652 case MachO::CPU_SUBTYPE_ARM_V6M: in getArchTriple()
2658 case MachO::CPU_SUBTYPE_ARM_V7: in getArchTriple()
2662 case MachO::CPU_SUBTYPE_ARM_V7EM: in getArchTriple()
2668 case MachO::CPU_SUBTYPE_ARM_V7K: in getArchTriple()
2674 case MachO::CPU_SUBTYPE_ARM_V7M: in getArchTriple()
2680 case MachO::CPU_SUBTYPE_ARM_V7S: in getArchTriple()
2689 case MachO::CPU_TYPE_ARM64: in getArchTriple()
2690 switch (CPUSubType & ~MachO::CPU_SUBTYPE_MASK) { in getArchTriple()
2691 case MachO::CPU_SUBTYPE_ARM64_ALL: in getArchTriple()
2697 case MachO::CPU_SUBTYPE_ARM64E: in getArchTriple()
2706 case MachO::CPU_TYPE_ARM64_32: in getArchTriple()
2707 switch (CPUSubType & ~MachO::CPU_SUBTYPE_MASK) { in getArchTriple()
2708 case MachO::CPU_SUBTYPE_ARM64_32_V8: in getArchTriple()
2717 case MachO::CPU_TYPE_POWERPC: in getArchTriple()
2718 switch (CPUSubType & ~MachO::CPU_SUBTYPE_MASK) { in getArchTriple()
2719 case MachO::CPU_SUBTYPE_POWERPC_ALL: in getArchTriple()
2726 case MachO::CPU_TYPE_POWERPC64: in getArchTriple()
2727 switch (CPUSubType & ~MachO::CPU_SUBTYPE_MASK) { in getArchTriple()
2728 case MachO::CPU_SUBTYPE_POWERPC_ALL: in getArchTriple()
2799 MachO::linkedit_data_command DicLC = getDataInCodeLoadCommand(); in begin_dices()
2809 MachO::linkedit_data_command DicLC = getDataInCodeLoadCommand(); in end_dices()
2921 uint64_t Kind = State.Flags & MachO::EXPORT_SYMBOL_FLAGS_KIND_MASK; in pushNode()
2923 (Kind != MachO::EXPORT_SYMBOL_FLAGS_KIND_REGULAR && in pushNode()
2924 Kind != MachO::EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE && in pushNode()
2925 Kind != MachO::EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL)) { in pushNode()
2933 if (State.Flags & MachO::EXPORT_SYMBOL_FLAGS_REEXPORT) { in pushNode()
2987 if (State.Flags & MachO::EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER) { in pushNode()
3173 uint8_t ImmValue = Byte & MachO::REBASE_IMMEDIATE_MASK; in moveNext()
3174 uint8_t Opcode = Byte & MachO::REBASE_OPCODE_MASK; in moveNext()
3178 case MachO::REBASE_OPCODE_DONE: in moveNext()
3184 case MachO::REBASE_OPCODE_SET_TYPE_IMM: in moveNext()
3186 if (RebaseType > MachO::REBASE_TYPE_TEXT_PCREL32) { in moveNext()
3198 case MachO::REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB: in moveNext()
3224 case MachO::REBASE_OPCODE_ADD_ADDR_ULEB: in moveNext()
3247 case MachO::REBASE_OPCODE_ADD_ADDR_IMM_SCALED: in moveNext()
3263 case MachO::REBASE_OPCODE_DO_REBASE_IMM_TIMES: in moveNext()
3288 case MachO::REBASE_OPCODE_DO_REBASE_ULEB_TIMES: in moveNext()
3320 case MachO::REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB: in moveNext()
3349 case MachO::REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB: in moveNext()
3417 case MachO::REBASE_TYPE_POINTER: in typeName()
3419 case MachO::REBASE_TYPE_TEXT_ABSOLUTE32: in typeName()
3421 case MachO::REBASE_TYPE_TEXT_PCREL32: in typeName()
3510 uint8_t ImmValue = Byte & MachO::BIND_IMMEDIATE_MASK; in moveNext()
3511 uint8_t Opcode = Byte & MachO::BIND_OPCODE_MASK; in moveNext()
3517 case MachO::BIND_OPCODE_DONE: in moveNext()
3534 case MachO::BIND_OPCODE_SET_DYLIB_ORDINAL_IMM: in moveNext()
3559 case MachO::BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB: in moveNext()
3591 case MachO::BIND_OPCODE_SET_DYLIB_SPECIAL_IMM: in moveNext()
3600 SignExtended = MachO::BIND_OPCODE_MASK | ImmValue; in moveNext()
3602 if (Ordinal < MachO::BIND_SPECIAL_DYLIB_FLAT_LOOKUP) { in moveNext()
3618 case MachO::BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM: in moveNext()
3640 if (ImmValue & MachO::BIND_SYMBOL_FLAGS_NON_WEAK_DEFINITION) in moveNext()
3644 case MachO::BIND_OPCODE_SET_TYPE_IMM: in moveNext()
3646 if (ImmValue > MachO::BIND_TYPE_TEXT_PCREL32) { in moveNext()
3658 case MachO::BIND_OPCODE_SET_ADDEND_SLEB: in moveNext()
3672 case MachO::BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB: in moveNext()
3698 case MachO::BIND_OPCODE_ADD_ADDR_ULEB: in moveNext()
3721 case MachO::BIND_OPCODE_DO_BIND: in moveNext()
3754 case MachO::BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB: in moveNext()
3818 case MachO::BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED: in moveNext()
3860 case MachO::BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB: in moveNext()
3961 case MachO::BIND_TYPE_POINTER: in typeName()
3963 case MachO::BIND_TYPE_TEXT_ABSOLUTE32: in typeName()
3965 case MachO::BIND_TYPE_TEXT_PCREL32: in typeName()
4183 MachOObjectFile::isRelocationScattered(const MachO::any_relocation_info &RE) in isRelocationScattered()
4185 if (getCPUType(*this) == MachO::CPU_TYPE_X86_64) in isRelocationScattered()
4187 return getPlainRelocationAddress(RE) & MachO::R_SCATTERED; in isRelocationScattered()
4191 const MachO::any_relocation_info &RE) const { in getPlainRelocationSymbolNum()
4198 const MachO::any_relocation_info &RE) const { in getPlainRelocationExternal()
4205 const MachO::any_relocation_info &RE) const { in getScatteredRelocationScattered()
4210 const MachO::any_relocation_info &RE) const { in getScatteredRelocationValue()
4215 const MachO::any_relocation_info &RE) const { in getScatteredRelocationType()
4220 const MachO::any_relocation_info &RE) const { in getAnyRelocationAddress()
4227 const MachO::any_relocation_info &RE) const { in getAnyRelocationPCRel()
4234 const MachO::any_relocation_info &RE) const { in getAnyRelocationLength()
4242 const MachO::any_relocation_info &RE) const { in getAnyRelocationType()
4250 const MachO::any_relocation_info &RE) const { in getAnyRelocationSection()
4254 if (SecNum == MachO::R_ABS || SecNum > Sections.size()) in getAnyRelocationSection()
4261 MachO::section MachOObjectFile::getSection(DataRefImpl DRI) const { in getSection()
4263 return getStruct<MachO::section>(*this, Sections[DRI.d.a]); in getSection()
4266 MachO::section_64 MachOObjectFile::getSection64(DataRefImpl DRI) const { in getSection64()
4268 return getStruct<MachO::section_64>(*this, Sections[DRI.d.a]); in getSection64()
4271 MachO::section MachOObjectFile::getSection(const LoadCommandInfo &L, in getSection()
4274 return getStruct<MachO::section>(*this, Sec); in getSection()
4277 MachO::section_64 MachOObjectFile::getSection64(const LoadCommandInfo &L, in getSection64()
4280 return getStruct<MachO::section_64>(*this, Sec); in getSection64()
4283 MachO::nlist
4286 return getStruct<MachO::nlist>(*this, P); in getSymbolTableEntry()
4289 MachO::nlist_64
4292 return getStruct<MachO::nlist_64>(*this, P); in getSymbol64TableEntry()
4295 MachO::linkedit_data_command
4297 return getStruct<MachO::linkedit_data_command>(*this, L.Ptr); in getLinkeditDataLoadCommand()
4300 MachO::segment_command
4302 return getStruct<MachO::segment_command>(*this, L.Ptr); in getSegmentLoadCommand()
4305 MachO::segment_command_64
4307 return getStruct<MachO::segment_command_64>(*this, L.Ptr); in getSegment64LoadCommand()
4310 MachO::linker_option_command
4312 return getStruct<MachO::linker_option_command>(*this, L.Ptr); in getLinkerOptionLoadCommand()
4315 MachO::version_min_command
4317 return getStruct<MachO::version_min_command>(*this, L.Ptr); in getVersionMinLoadCommand()
4320 MachO::note_command
4322 return getStruct<MachO::note_command>(*this, L.Ptr); in getNoteLoadCommand()
4325 MachO::build_version_command
4327 return getStruct<MachO::build_version_command>(*this, L.Ptr); in getBuildVersionLoadCommand()
4330 MachO::build_tool_version
4332 return getStruct<MachO::build_tool_version>(*this, BuildTools[index]); in getBuildToolVersion()
4335 MachO::dylib_command
4337 return getStruct<MachO::dylib_command>(*this, L.Ptr); in getDylibIDLoadCommand()
4340 MachO::dyld_info_command
4342 return getStruct<MachO::dyld_info_command>(*this, L.Ptr); in getDyldInfoLoadCommand()
4345 MachO::dylinker_command
4347 return getStruct<MachO::dylinker_command>(*this, L.Ptr); in getDylinkerCommand()
4350 MachO::uuid_command
4352 return getStruct<MachO::uuid_command>(*this, L.Ptr); in getUuidCommand()
4355 MachO::rpath_command
4357 return getStruct<MachO::rpath_command>(*this, L.Ptr); in getRpathCommand()
4360 MachO::source_version_command
4362 return getStruct<MachO::source_version_command>(*this, L.Ptr); in getSourceVersionCommand()
4365 MachO::entry_point_command
4367 return getStruct<MachO::entry_point_command>(*this, L.Ptr); in getEntryPointCommand()
4370 MachO::encryption_info_command
4372 return getStruct<MachO::encryption_info_command>(*this, L.Ptr); in getEncryptionInfoCommand()
4375 MachO::encryption_info_command_64
4377 return getStruct<MachO::encryption_info_command_64>(*this, L.Ptr); in getEncryptionInfoCommand64()
4380 MachO::sub_framework_command
4382 return getStruct<MachO::sub_framework_command>(*this, L.Ptr); in getSubFrameworkCommand()
4385 MachO::sub_umbrella_command
4387 return getStruct<MachO::sub_umbrella_command>(*this, L.Ptr); in getSubUmbrellaCommand()
4390 MachO::sub_library_command
4392 return getStruct<MachO::sub_library_command>(*this, L.Ptr); in getSubLibraryCommand()
4395 MachO::sub_client_command
4397 return getStruct<MachO::sub_client_command>(*this, L.Ptr); in getSubClientCommand()
4400 MachO::routines_command
4402 return getStruct<MachO::routines_command>(*this, L.Ptr); in getRoutinesCommand()
4405 MachO::routines_command_64
4407 return getStruct<MachO::routines_command_64>(*this, L.Ptr); in getRoutinesCommand64()
4410 MachO::thread_command
4412 return getStruct<MachO::thread_command>(*this, L.Ptr); in getThreadCommand()
4415 MachO::any_relocation_info
4418 if (getHeader().filetype == MachO::MH_OBJECT) { in getRelocation()
4422 MachO::section_64 Sect = getSection64(Sec); in getRelocation()
4425 MachO::section Sect = getSection(Sec); in getRelocation()
4429 MachO::dysymtab_command DysymtabLoadCmd = getDysymtabLoadCommand(); in getRelocation()
4436 auto P = reinterpret_cast<const MachO::any_relocation_info *>( in getRelocation()
4438 return getStruct<MachO::any_relocation_info>( in getRelocation()
4442 MachO::data_in_code_entry
4445 return getStruct<MachO::data_in_code_entry>(*this, P); in getDice()
4448 const MachO::mach_header &MachOObjectFile::getHeader() const { in getHeader()
4452 const MachO::mach_header_64 &MachOObjectFile::getHeader64() const { in getHeader64()
4458 const MachO::dysymtab_command &DLC, in getIndirectSymbolTableEntry()
4464 MachO::data_in_code_entry
4467 uint64_t Offset = DataOffset + Index * sizeof(MachO::data_in_code_entry); in getDataInCodeTableEntry()
4468 return getStruct<MachO::data_in_code_entry>(*this, getPtr(*this, Offset)); in getDataInCodeTableEntry()
4471 MachO::symtab_command MachOObjectFile::getSymtabLoadCommand() const { in getSymtabLoadCommand()
4473 return getStruct<MachO::symtab_command>(*this, SymtabLoadCmd); in getSymtabLoadCommand()
4476 MachO::symtab_command Cmd; in getSymtabLoadCommand()
4477 Cmd.cmd = MachO::LC_SYMTAB; in getSymtabLoadCommand()
4478 Cmd.cmdsize = sizeof(MachO::symtab_command); in getSymtabLoadCommand()
4486 MachO::dysymtab_command MachOObjectFile::getDysymtabLoadCommand() const { in getDysymtabLoadCommand()
4488 return getStruct<MachO::dysymtab_command>(*this, DysymtabLoadCmd); in getDysymtabLoadCommand()
4491 MachO::dysymtab_command Cmd; in getDysymtabLoadCommand()
4492 Cmd.cmd = MachO::LC_DYSYMTAB; in getDysymtabLoadCommand()
4493 Cmd.cmdsize = sizeof(MachO::dysymtab_command); in getDysymtabLoadCommand()
4515 MachO::linkedit_data_command
4518 return getStruct<MachO::linkedit_data_command>(*this, DataInCodeLoadCmd); in getDataInCodeLoadCommand()
4521 MachO::linkedit_data_command Cmd; in getDataInCodeLoadCommand()
4522 Cmd.cmd = MachO::LC_DATA_IN_CODE; in getDataInCodeLoadCommand()
4523 Cmd.cmdsize = sizeof(MachO::linkedit_data_command); in getDataInCodeLoadCommand()
4529 MachO::linkedit_data_command
4532 return getStruct<MachO::linkedit_data_command>(*this, LinkOptHintsLoadCmd); in getLinkOptHintsLoadCommand()
4536 MachO::linkedit_data_command Cmd; in getLinkOptHintsLoadCommand()
4537 Cmd.cmd = MachO::LC_LINKER_OPTIMIZATION_HINT; in getLinkOptHintsLoadCommand()
4538 Cmd.cmdsize = sizeof(MachO::linkedit_data_command); in getLinkOptHintsLoadCommand()
4549 getStructOrErr<MachO::dyld_info_command>(*this, DyldInfoLoadCmd); in getDyldInfoRebaseOpcodes()
4552 MachO::dyld_info_command DyldInfo = DyldInfoOrErr.get(); in getDyldInfoRebaseOpcodes()
4563 getStructOrErr<MachO::dyld_info_command>(*this, DyldInfoLoadCmd); in getDyldInfoBindOpcodes()
4566 MachO::dyld_info_command DyldInfo = DyldInfoOrErr.get(); in getDyldInfoBindOpcodes()
4577 getStructOrErr<MachO::dyld_info_command>(*this, DyldInfoLoadCmd); in getDyldInfoWeakBindOpcodes()
4580 MachO::dyld_info_command DyldInfo = DyldInfoOrErr.get(); in getDyldInfoWeakBindOpcodes()
4591 getStructOrErr<MachO::dyld_info_command>(*this, DyldInfoLoadCmd); in getDyldInfoLazyBindOpcodes()
4594 MachO::dyld_info_command DyldInfo = DyldInfoOrErr.get(); in getDyldInfoLazyBindOpcodes()
4605 getStructOrErr<MachO::dyld_info_command>(*this, DyldInfoLoadCmd); in getDyldInfoExportsTrie()
4608 MachO::dyld_info_command DyldInfo = DyldInfoOrErr.get(); in getDyldInfoExportsTrie()
4618 const char *Ptr = UuidLoadCmd + offsetof(MachO::uuid_command, uuid); in getUuid()
4623 MachO::symtab_command S = getSymtabLoadCommand(); in getStringTableData()
4645 return getHeader().filetype == MachO::MH_OBJECT; in isRelocatableObject()