├── .github └── banner.png ├── .gitignore ├── .gitmodules ├── Docs └── Doxyfile_Internal ├── LICENSE ├── MachOKit.xcodeproj └── project.pbxproj ├── MachOKit ├── Bindings │ ├── MKBindAction.h │ ├── MKBindAction.m │ ├── MKBindActionBind.h │ ├── MKBindActionBind.m │ ├── MKBindActionThreadedBind.h │ ├── MKBindActionThreadedBind.m │ ├── MKBindActionThreadedRebase.h │ ├── MKBindActionThreadedRebase.m │ ├── MKBindAddAddressULEB.h │ ├── MKBindAddAddressULEB.m │ ├── MKBindCommand.h │ ├── MKBindCommand.m │ ├── MKBindCommandOffsetAdjusting.h │ ├── MKBindContext.h │ ├── MKBindDoBind.h │ ├── MKBindDoBind.m │ ├── MKBindDoBindAddAddressImmediateScaled.h │ ├── MKBindDoBindAddAddressImmediateScaled.m │ ├── MKBindDoBindAddAddressULEB.h │ ├── MKBindDoBindAddAddressULEB.m │ ├── MKBindDoBindULEBTimesSkippingULEB.h │ ├── MKBindDoBindULEBTimesSkippingULEB.m │ ├── MKBindDone.h │ ├── MKBindDone.m │ ├── MKBindSetAddendSLEB.h │ ├── MKBindSetAddendSLEB.m │ ├── MKBindSetDylibOrdinalImmediate.h │ ├── MKBindSetDylibOrdinalImmediate.m │ ├── MKBindSetDylibOrdinalULEB.h │ ├── MKBindSetDylibOrdinalULEB.m │ ├── MKBindSetDylibSpecialImmediate.h │ ├── MKBindSetDylibSpecialImmediate.m │ ├── MKBindSetSegmentAndOffsetULEB.h │ ├── MKBindSetSegmentAndOffsetULEB.m │ ├── MKBindSetSymbolAndFlags.h │ ├── MKBindSetSymbolAndFlags.m │ ├── MKBindSetTypeImmediate.h │ ├── MKBindSetTypeImmediate.m │ ├── MKBindThreaded.h │ ├── MKBindThreaded.m │ ├── MKBindThreadedApply.h │ ├── MKBindThreadedApply.m │ ├── MKBindThreadedSetBindOrdinalTableSizeULEB.h │ ├── MKBindThreadedSetBindOrdinalTableSizeULEB.m │ ├── MKBindingsInfo.h │ ├── MKBindingsInfo.m │ ├── MKLazyBindingsInfo.h │ ├── MKLazyBindingsInfo.m │ ├── MKMachO+Bindings.h │ ├── MKMachO+Bindings.m │ ├── MKWeakBindingsInfo.h │ ├── MKWeakBindingsInfo.m │ └── Type │ │ ├── MKBindingsFieldType.h │ │ ├── MKNodeFieldBindOpcodeType.h │ │ ├── MKNodeFieldBindOpcodeType.m │ │ ├── MKNodeFieldBindSymbolFlagsType.h │ │ ├── MKNodeFieldBindSymbolFlagsType.m │ │ ├── MKNodeFieldBindThreadedSubOpcodeType.h │ │ ├── MKNodeFieldBindThreadedSubOpcodeType.m │ │ ├── MKNodeFieldBindType.h │ │ └── MKNodeFieldBindType.m ├── CF │ ├── Sections │ │ ├── MKCFStringSection.h │ │ └── MKCFStringSection.m │ └── String │ │ ├── MKCFString.h │ │ └── MKCFString.m ├── Core │ ├── Data Model │ │ ├── MKARMDataModel.h │ │ ├── MKARMDataModel.m │ │ ├── MKAbstractDataModel.h │ │ ├── MKAbstractDataModel.m │ │ ├── MKDarwinDataModels.h │ │ ├── MKDarwinDataModels.m │ │ ├── MKDataModel.h │ │ ├── MKILP32DataModel.h │ │ ├── MKILP32DataModel.m │ │ ├── MKLP64DataModel.h │ │ ├── MKLP64DataModel.m │ │ ├── MKX86DataModel.h │ │ └── MKX86DataModel.m │ ├── Description │ │ ├── Field │ │ │ ├── MKNodeField.h │ │ │ ├── MKNodeField.m │ │ │ ├── MKNodeFieldBuilder.h │ │ │ ├── MKNodeFieldBuilder.m │ │ │ ├── MKNodeFieldDeprecated.h │ │ │ └── MKNodeFieldDeprecated.m │ │ ├── Formatter │ │ │ ├── MKBitfieldFormatter.h │ │ │ ├── MKBitfieldFormatter.m │ │ │ ├── MKBooleanFormatter.h │ │ │ ├── MKBooleanFormatter.m │ │ │ ├── MKComboFormatter.h │ │ │ ├── MKComboFormatter.m │ │ │ ├── MKEnumerationFormatter.h │ │ │ ├── MKEnumerationFormatter.m │ │ │ ├── MKFormatterChain.h │ │ │ ├── MKFormatterChain.m │ │ │ ├── MKHexNumberFormatter.h │ │ │ ├── MKHexNumberFormatter.m │ │ │ ├── MKObjectFormatter.h │ │ │ ├── MKObjectFormatter.m │ │ │ ├── MKOptionSetFormatter.h │ │ │ ├── MKOptionSetFormatter.m │ │ │ ├── MKStringFormatter.h │ │ │ ├── MKStringFormatter.m │ │ │ ├── NSFormatter+MKNodeField.h │ │ │ └── NSFormatter+MKNodeField.m │ │ ├── MKNodeDescription.h │ │ ├── MKNodeDescription.m │ │ ├── Recipe │ │ │ ├── MKNodeFieldDataOperationExtractChildNodeData.h │ │ │ ├── MKNodeFieldDataOperationExtractChildNodeData.m │ │ │ ├── MKNodeFieldDataOperationExtractDynamicSubrange.h │ │ │ ├── MKNodeFieldDataOperationExtractDynamicSubrange.m │ │ │ ├── MKNodeFieldDataOperationExtractSubrange.h │ │ │ ├── MKNodeFieldDataOperationExtractSubrange.m │ │ │ ├── MKNodeFieldDataRecipe.h │ │ │ ├── MKNodeFieldOperationReadKeyPath.h │ │ │ ├── MKNodeFieldOperationReadKeyPath.m │ │ │ ├── MKNodeFieldOperationReturnConstant.h │ │ │ ├── MKNodeFieldOperationReturnConstant.m │ │ │ ├── MKNodeFieldRecipe.h │ │ │ ├── MKNodeFieldValueRecipe.h │ │ │ └── ValueModifiers │ │ │ │ ├── MKNodeFieldExtractSortedDictionaryValues.h │ │ │ │ └── MKNodeFieldExtractSortedDictionaryValues.m │ │ └── Type │ │ │ ├── MKFieldType.h │ │ │ ├── MKNodeFieldBitfieldType.h │ │ │ ├── MKNodeFieldBooleanType.h │ │ │ ├── MKNodeFieldCollectionType.h │ │ │ ├── MKNodeFieldContainerType.h │ │ │ ├── MKNodeFieldDateType.h │ │ │ ├── MKNodeFieldEnumerationType.h │ │ │ ├── MKNodeFieldNodeType.h │ │ │ ├── MKNodeFieldNumericType.h │ │ │ ├── MKNodeFieldOptionSetType.h │ │ │ ├── MKNodeFieldPointerType.h │ │ │ ├── MKNodeFieldStringType.h │ │ │ ├── MKNodeFieldType.h │ │ │ ├── MKNodeFieldTypeAddress.h │ │ │ ├── MKNodeFieldTypeAddress.m │ │ │ ├── MKNodeFieldTypeBitfield.h │ │ │ ├── MKNodeFieldTypeBitfield.m │ │ │ ├── MKNodeFieldTypeBoolean.h │ │ │ ├── MKNodeFieldTypeBoolean.m │ │ │ ├── MKNodeFieldTypeByte.h │ │ │ ├── MKNodeFieldTypeByte.m │ │ │ ├── MKNodeFieldTypeCollection.h │ │ │ ├── MKNodeFieldTypeCollection.m │ │ │ ├── MKNodeFieldTypeDate.h │ │ │ ├── MKNodeFieldTypeDate.m │ │ │ ├── MKNodeFieldTypeDoubleWord.h │ │ │ ├── MKNodeFieldTypeDoubleWord.m │ │ │ ├── MKNodeFieldTypeEnumeration.h │ │ │ ├── MKNodeFieldTypeEnumeration.m │ │ │ ├── MKNodeFieldTypeNode.h │ │ │ ├── MKNodeFieldTypeNode.m │ │ │ ├── MKNodeFieldTypeOffset.h │ │ │ ├── MKNodeFieldTypeOffset.m │ │ │ ├── MKNodeFieldTypeOptionSet.h │ │ │ ├── MKNodeFieldTypeOptionSet.m │ │ │ ├── MKNodeFieldTypePointer.h │ │ │ ├── MKNodeFieldTypePointer.m │ │ │ ├── MKNodeFieldTypeQuadWord.h │ │ │ ├── MKNodeFieldTypeQuadWord.m │ │ │ ├── MKNodeFieldTypeSize.h │ │ │ ├── MKNodeFieldTypeSize.m │ │ │ ├── MKNodeFieldTypeString.h │ │ │ ├── MKNodeFieldTypeString.m │ │ │ ├── MKNodeFieldTypeWord.h │ │ │ └── MKNodeFieldTypeWord.m │ ├── Impl │ │ ├── MKPtr.h │ │ └── MKPtr.m │ ├── MKAddressedNode.h │ ├── MKAddressedNode.m │ ├── MKBackedNode.h │ ├── MKBackedNode.m │ ├── MKNode.h │ ├── MKNode.m │ ├── MKOffsetNode.h │ ├── MKOffsetNode.m │ ├── MKPointer.h │ ├── MKPointer.m │ └── Memory │ │ ├── MKMemoryMap.h │ │ ├── MKMemoryMap.m │ │ ├── _MKFileMemoryMap.h │ │ ├── _MKFileMemoryMap.m │ │ ├── _MKTaskMemoryMap.h │ │ └── _MKTaskMemoryMap.m ├── DSC │ ├── Images │ │ ├── MKDSCImage.h │ │ ├── MKDSCImage.m │ │ ├── MKDSCImagesInfo.h │ │ ├── MKDSCImagesInfo.m │ │ ├── MKSharedCache+Images.h │ │ └── MKSharedCache+Images.m │ ├── MKDSCHeader.h │ ├── MKDSCHeader.m │ ├── MKDSCMapping.h │ ├── MKDSCMapping.m │ ├── MKDSCMappingInfo.h │ ├── MKDSCMappingInfo.m │ ├── MKNode+SharedCache.h │ ├── MKNode+SharedCache.m │ ├── MKSharedCache.h │ ├── MKSharedCache.m │ ├── Slide │ │ ├── MKDSCSlidPointer.h │ │ ├── MKDSCSlidPointer.m │ │ ├── MKDSCSlideInfo.h │ │ ├── MKDSCSlideInfo.m │ │ ├── MKDSCSlideInfoBitmap.h │ │ ├── MKDSCSlideInfoBitmap.m │ │ ├── MKDSCSlideInfoHeader.h │ │ ├── MKDSCSlideInfoHeader.m │ │ ├── MKDSCSlideInfoPage.h │ │ ├── MKDSCSlideInfoPage.m │ │ ├── MKSharedCache+Slide.h │ │ └── MKSharedCache+Slide.m │ ├── Symbols │ │ ├── MKDSCDylibInfos.h │ │ ├── MKDSCDylibInfos.m │ │ ├── MKDSCDylibSymbolInfo.h │ │ ├── MKDSCDylibSymbolInfo.m │ │ ├── MKDSCLocalSymbols.h │ │ ├── MKDSCLocalSymbols.m │ │ ├── MKDSCLocalSymbolsHeader.h │ │ ├── MKDSCLocalSymbolsHeader.m │ │ ├── MKDSCStringTable.h │ │ ├── MKDSCStringTable.m │ │ ├── MKDSCSymbol.h │ │ ├── MKDSCSymbol.m │ │ ├── MKDSCSymbolTable.h │ │ ├── MKDSCSymbolTable.m │ │ ├── MKSharedCache+Symbols.h │ │ └── MKSharedCache+Symbols.m │ └── dyld_cache_format.h ├── DataInCode │ ├── MKDataInCode.h │ ├── MKDataInCode.m │ ├── MKDataInCodeEntry.h │ ├── MKDataInCodeEntry.m │ ├── MKMachOImage+DataInCode.h │ ├── MKMachOImage+DataInCode.m │ └── Type │ │ ├── MKDataInCodeFieldType.h │ │ ├── MKNodeFieldDataInCodeEntryType.h │ │ └── MKNodeFieldDataInCodeEntryType.m ├── Exports │ ├── MKExport.h │ ├── MKExport.m │ ├── MKExportTrieBranch.h │ ├── MKExportTrieBranch.m │ ├── MKExportTrieNode.h │ ├── MKExportTrieNode.m │ ├── MKExportTrieTerminalNode.h │ ├── MKExportTrieTerminalNode.m │ ├── MKExportsInfo.h │ ├── MKExportsInfo.m │ ├── MKMachO+Exports.h │ ├── MKMachO+Exports.m │ ├── MKReExport.h │ ├── MKReExport.m │ ├── MKRegularExport.h │ ├── MKRegularExport.m │ ├── MKResolvedExport.h │ ├── MKResolvedExport.m │ └── Type │ │ ├── MKExportsFieldType.h │ │ ├── MKNodeFieldExportFlagsType.h │ │ ├── MKNodeFieldExportFlagsType.m │ │ ├── MKNodeFieldExportKindType.h │ │ ├── MKNodeFieldExportKindType.m │ │ ├── MKNodeFieldExportOptionsType.h │ │ └── MKNodeFieldExportOptionsType.m ├── Fat │ ├── MKFatArch.h │ ├── MKFatArch.m │ ├── MKFatBinary.h │ └── MKFatBinary.m ├── FunctionStarts │ ├── MKFunction.h │ ├── MKFunction.m │ ├── MKFunctionOffset.h │ ├── MKFunctionOffset.m │ ├── MKFunctionStarts.h │ ├── MKFunctionStarts.m │ ├── MKFunctionStartsContext.h │ ├── MKMachO+Functions.h │ └── MKMachO+Functions.m ├── Header │ ├── MKMachHeader.h │ ├── MKMachHeader.m │ ├── MKMachHeader64.h │ └── MKMachHeader64.m ├── Libraries │ ├── MKDependentLibrary.h │ ├── MKDependentLibrary.m │ ├── MKMachO+Libraries.h │ └── MKMachO+Libraries.m ├── Load_Commands │ ├── MKDylibLoadCommand.h │ ├── MKDylibLoadCommand.m │ ├── MKDylinkerLoadCommand.h │ ├── MKDylinkerLoadCommand.m │ ├── MKLCBuildVersion.h │ ├── MKLCBuildVersion.m │ ├── MKLCCodeSignature.h │ ├── MKLCCodeSignature.m │ ├── MKLCDataInCode.h │ ├── MKLCDataInCode.m │ ├── MKLCDyldChainedFixups.h │ ├── MKLCDyldChainedFixups.m │ ├── MKLCDyldEnvironment.h │ ├── MKLCDyldEnvironment.m │ ├── MKLCDyldExportsTrie.h │ ├── MKLCDyldExportsTrie.m │ ├── MKLCDyldInfo.h │ ├── MKLCDyldInfo.m │ ├── MKLCDyldInfoOnly.h │ ├── MKLCDyldInfoOnly.m │ ├── MKLCDylibCodeSignDrs.h │ ├── MKLCDylibCodeSignDrs.m │ ├── MKLCDysymtab.h │ ├── MKLCDysymtab.m │ ├── MKLCEncryptionInfo.h │ ├── MKLCEncryptionInfo.m │ ├── MKLCEncryptionInfo64.h │ ├── MKLCEncryptionInfo64.m │ ├── MKLCFunctionStarts.h │ ├── MKLCFunctionStarts.m │ ├── MKLCIDDylib.h │ ├── MKLCIDDylib.m │ ├── MKLCIDDylinker.h │ ├── MKLCIDDylinker.m │ ├── MKLCLazyLoadDylib.h │ ├── MKLCLazyLoadDylib.m │ ├── MKLCLinkerOption.h │ ├── MKLCLinkerOption.m │ ├── MKLCLoadDylib.h │ ├── MKLCLoadDylib.m │ ├── MKLCLoadDylinker.h │ ├── MKLCLoadDylinker.m │ ├── MKLCLoadUpwardDylib.h │ ├── MKLCLoadUpwardDylib.m │ ├── MKLCLoadWeakDylib.h │ ├── MKLCLoadWeakDylib.m │ ├── MKLCMain.h │ ├── MKLCMain.m │ ├── MKLCNote.h │ ├── MKLCNote.m │ ├── MKLCPrebindChecksum.h │ ├── MKLCPrebindChecksum.m │ ├── MKLCRPath.h │ ├── MKLCRPath.m │ ├── MKLCReExportDylib.h │ ├── MKLCReExportDylib.m │ ├── MKLCRoutines.h │ ├── MKLCRoutines.m │ ├── MKLCRoutines64.h │ ├── MKLCRoutines64.m │ ├── MKLCSegment.h │ ├── MKLCSegment.m │ ├── MKLCSegment64.h │ ├── MKLCSegment64.m │ ├── MKLCSegmentSplitInfo.h │ ├── MKLCSegmentSplitInfo.m │ ├── MKLCSourceVersion.h │ ├── MKLCSourceVersion.m │ ├── MKLCSubClient.h │ ├── MKLCSubClient.m │ ├── MKLCSubFramework.h │ ├── MKLCSubFramework.m │ ├── MKLCSubLibrary.h │ ├── MKLCSubLibrary.m │ ├── MKLCSymtab.h │ ├── MKLCSymtab.m │ ├── MKLCTwoLevelHints.h │ ├── MKLCTwoLevelHints.m │ ├── MKLCUUID.h │ ├── MKLCUUID.m │ ├── MKLCVersionMinMacOSX.h │ ├── MKLCVersionMinMacOSX.m │ ├── MKLCVersionMinTVOS.h │ ├── MKLCVersionMinTVOS.m │ ├── MKLCVersionMinWatchOS.h │ ├── MKLCVersionMinWatchOS.m │ ├── MKLCVersionMiniPhoneOS.h │ ├── MKLCVersionMiniPhoneOS.m │ ├── MKLinkEditDataLoadCommand.h │ ├── MKLinkEditDataLoadCommand.m │ ├── MKLoadCommand.h │ ├── MKLoadCommand.m │ ├── MKMinVersionLoadCommand.h │ └── MKMinVersionLoadCommand.m ├── MKBase.h ├── MKDylibVersion.h ├── MKDylibVersion.m ├── MKInternal.h ├── MKLinkEditNode.h ├── MKLinkEditNode.m ├── MKMachO.h ├── MKMachO.m ├── MKNode+MachO.h ├── MKNode+MachO.m ├── MKOffsetNode+AddressBasedInitialization.h ├── MKOffsetNode+AddressBasedInitialization.m ├── MKResult.h ├── MKResult.m ├── MKSourceVersion.h ├── MKSourceVersion.m ├── MKVersion.h ├── MKVersion.m ├── MachOKit.h ├── MachOKit.m ├── NSError+MK.h ├── NSError+MK.m ├── NSNumber+MK.h ├── NSNumber+MK.m ├── ObjC │ ├── Category │ │ ├── MKObjCCategory.h │ │ └── MKObjCCategory.m │ ├── Class │ │ ├── MKObjCClass.h │ │ ├── MKObjCClass.m │ │ ├── MKObjCClassData.h │ │ ├── MKObjCClassData.m │ │ └── Type │ │ │ ├── MKNodeFieldObjCClassFlagsType.h │ │ │ ├── MKNodeFieldObjCClassFlagsType.m │ │ │ └── MKObjCClassFieldType.h │ ├── ImageInfo │ │ ├── MKObjCImageInfo.h │ │ ├── MKObjCImageInfo.m │ │ └── Type │ │ │ ├── MKNodeFieldObjCImageInfoFlagsType.h │ │ │ ├── MKNodeFieldObjCImageInfoFlagsType.m │ │ │ ├── MKNodeFieldObjCImageInfoImageFlagsType.h │ │ │ ├── MKNodeFieldObjCImageInfoImageFlagsType.m │ │ │ ├── MKNodeFieldObjCImageInfoSwiftVersionType.h │ │ │ ├── MKNodeFieldObjCImageInfoSwiftVersionType.m │ │ │ └── MKObjCImageInfoFieldType.h │ ├── MKDataModel+ObjC.h │ ├── MKDataModel+ObjC.m │ ├── MKObjCElementList.h │ ├── MKObjCElementList.m │ ├── Method │ │ ├── MKObjCClassMethod.h │ │ ├── MKObjCClassMethod.m │ │ ├── MKObjCClassMethodList.h │ │ └── MKObjCClassMethodList.m │ ├── Property │ │ ├── MKObjCClassProperty.h │ │ ├── MKObjCClassProperty.m │ │ ├── MKObjCClassPropertyList.h │ │ └── MKObjCClassPropertyList.m │ ├── Protocol │ │ ├── MKObjCProtocol.h │ │ ├── MKObjCProtocol.m │ │ ├── MKObjCProtocolList.h │ │ ├── MKObjCProtocolList.m │ │ ├── MKObjCProtocolMethodTypesList.h │ │ └── MKObjCProtocolMethodTypesList.m │ ├── Sections │ │ ├── MKObjCCategoryListSection.h │ │ ├── MKObjCCategoryListSection.m │ │ ├── MKObjCClassListSection.h │ │ ├── MKObjCClassListSection.m │ │ ├── MKObjCClassReferencesSection.h │ │ ├── MKObjCClassReferencesSection.m │ │ ├── MKObjCConstSection.h │ │ ├── MKObjCConstSection.m │ │ ├── MKObjCDataSection.h │ │ ├── MKObjCDataSection.m │ │ ├── MKObjCIVarSection.h │ │ ├── MKObjCIVarSection.m │ │ ├── MKObjCImageInfoSection.h │ │ ├── MKObjCImageInfoSection.m │ │ ├── MKObjCProtocolListSection.h │ │ ├── MKObjCProtocolListSection.m │ │ ├── MKObjCProtocolReferencesSection.h │ │ ├── MKObjCProtocolReferencesSection.m │ │ ├── MKObjCSelectorReferencesSection.h │ │ ├── MKObjCSelectorReferencesSection.m │ │ ├── MKObjCSuperReferencesSection.h │ │ └── MKObjCSuperReferencesSection.m │ └── iVar │ │ ├── MKObjCClassIVar.h │ │ ├── MKObjCClassIVar.m │ │ ├── MKObjCClassIVarList.h │ │ ├── MKObjCClassIVarList.m │ │ ├── MKObjCIVarOffset.h │ │ └── MKObjCIVarOffset.m ├── Rebase │ ├── MKFixup.h │ ├── MKFixup.m │ ├── MKMachO+Rebase.h │ ├── MKMachO+Rebase.m │ ├── MKRebaseAddAddressImmediateScaled.h │ ├── MKRebaseAddAddressImmediateScaled.m │ ├── MKRebaseAddAddressULEB.h │ ├── MKRebaseAddAddressULEB.m │ ├── MKRebaseCommand.h │ ├── MKRebaseCommand.m │ ├── MKRebaseCommandOffsetAdjusting.h │ ├── MKRebaseContext.h │ ├── MKRebaseDoRebaseAddAddressULEB.h │ ├── MKRebaseDoRebaseAddAddressULEB.m │ ├── MKRebaseDoRebaseImmediateTimes.h │ ├── MKRebaseDoRebaseImmediateTimes.m │ ├── MKRebaseDoRebaseULEBTimes.h │ ├── MKRebaseDoRebaseULEBTimes.m │ ├── MKRebaseDoRebaseULEBTimesSkippingULEB.h │ ├── MKRebaseDoRebaseULEBTimesSkippingULEB.m │ ├── MKRebaseDone.h │ ├── MKRebaseDone.m │ ├── MKRebaseInfo.h │ ├── MKRebaseInfo.m │ ├── MKRebaseSetSegmentAndOffsetULEB.h │ ├── MKRebaseSetSegmentAndOffsetULEB.m │ ├── MKRebaseSetTypeImmediate.h │ ├── MKRebaseSetTypeImmediate.m │ └── Type │ │ ├── MKNodeFieldRebaseOpcodeType.h │ │ ├── MKNodeFieldRebaseOpcodeType.m │ │ ├── MKNodeFieldRebaseType.h │ │ ├── MKNodeFieldRebaseType.m │ │ └── MKRebaseFieldType.h ├── Segments │ ├── MKMachO+Segments.h │ ├── MKMachO+Segments.m │ ├── MKSegment.h │ ├── MKSegment.m │ ├── Sections │ │ ├── MKCStringSection.h │ │ ├── MKCStringSection.m │ │ ├── MKDataSection.h │ │ ├── MKDataSection.m │ │ ├── MKIndirectPointersSection.h │ │ ├── MKIndirectPointersSection.m │ │ ├── MKPointerListSection.h │ │ ├── MKPointerListSection.m │ │ ├── MKSection.h │ │ ├── MKSection.m │ │ ├── MKSectionIndirectSymbolTableIndexing.h │ │ ├── MKStubsSection.h │ │ ├── MKStubsSection.m │ │ ├── MKUStringSection.h │ │ └── MKUStringSection.m │ └── Type │ │ ├── MKNodeFieldSegmentFlagsType.h │ │ ├── MKNodeFieldSegmentFlagsType.m │ │ └── Section │ │ ├── MKNodeFieldSectionFlagsType.h │ │ ├── MKNodeFieldSectionFlagsType.m │ │ ├── MKNodeFieldSectionSystemAttributesType.h │ │ ├── MKNodeFieldSectionSystemAttributesType.m │ │ ├── MKNodeFieldSectionType.h │ │ ├── MKNodeFieldSectionType.m │ │ ├── MKNodeFieldSectionUserAttributesType.h │ │ └── MKNodeFieldSectionUserAttributesType.m ├── Shared │ ├── MKCString.h │ ├── MKCString.m │ ├── MKLEB.h │ ├── MKLEB.m │ ├── MKPointer+Node.h │ ├── MKPointer+Node.m │ ├── MKPointerNode.h │ ├── MKPointerNode.m │ ├── MKString.h │ ├── MKUString.h │ ├── MKUString.m │ ├── Memory │ │ ├── MKMemoryMap+Pointer.h │ │ └── MKMemoryMap+Pointer.m │ └── Type │ │ ├── CPUType │ │ ├── MKNodeFieldCPUSubType.h │ │ ├── MKNodeFieldCPUSubType.m │ │ ├── MKNodeFieldCPUSubTypeARM.h │ │ ├── MKNodeFieldCPUSubTypeARM.m │ │ ├── MKNodeFieldCPUSubTypeARM64.h │ │ ├── MKNodeFieldCPUSubTypeARM64.m │ │ ├── MKNodeFieldCPUSubTypeARM6432.h │ │ ├── MKNodeFieldCPUSubTypeARM6432.m │ │ ├── MKNodeFieldCPUSubTypeAny.h │ │ ├── MKNodeFieldCPUSubTypeAny.m │ │ ├── MKNodeFieldCPUSubTypeFeatures.h │ │ ├── MKNodeFieldCPUSubTypeFeatures.m │ │ ├── MKNodeFieldCPUSubTypeI386.h │ │ ├── MKNodeFieldCPUSubTypeI386.m │ │ ├── MKNodeFieldCPUSubTypePowerPC.h │ │ ├── MKNodeFieldCPUSubTypePowerPC.m │ │ ├── MKNodeFieldCPUSubTypePowerPC64.h │ │ ├── MKNodeFieldCPUSubTypePowerPC64.m │ │ ├── MKNodeFieldCPUSubTypeX86.h │ │ ├── MKNodeFieldCPUSubTypeX86.m │ │ ├── MKNodeFieldCPUType.h │ │ └── MKNodeFieldCPUType.m │ │ └── MKSharedFieldType.h ├── SplitSegment │ ├── MKMachO+SplitSegment.h │ ├── MKMachO+SplitSegment.m │ ├── MKSplitSegmentInfo.h │ ├── MKSplitSegmentInfo.m │ └── V1 │ │ ├── MKSplitSegmentInfoV1.h │ │ ├── MKSplitSegmentInfoV1.m │ │ ├── MKSplitSegmentInfoV1Context.h │ │ ├── MKSplitSegmentInfoV1Entry.h │ │ ├── MKSplitSegmentInfoV1Entry.m │ │ ├── MKSplitSegmentInfoV1Fixup.h │ │ ├── MKSplitSegmentInfoV1Fixup.m │ │ ├── MKSplitSegmentInfoV1Offset.h │ │ ├── MKSplitSegmentInfoV1Offset.m │ │ ├── MKSplitSegmentInfoV1Opcode.h │ │ ├── MKSplitSegmentInfoV1Opcode.m │ │ ├── MKSplitSegmentInfoV1Terminator.h │ │ ├── MKSplitSegmentInfoV1Terminator.m │ │ └── Type │ │ ├── MKNodeFieldSplitSegmentInfoV1FixupType.h │ │ ├── MKNodeFieldSplitSegmentInfoV1FixupType.m │ │ ├── MKNodeFieldSplitSegmentInfoV1OpcodeType.h │ │ ├── MKNodeFieldSplitSegmentInfoV1OpcodeType.m │ │ └── MKSplitSegmentInfoV1FieldType.h ├── Symbols │ ├── DebugSymbols │ │ ├── MKASTSymbol.h │ │ ├── MKASTSymbol.m │ │ ├── MKBeginNamedSectionSymbol.h │ │ ├── MKBeginNamedSectionSymbol.m │ │ ├── MKEndNamedSectionSymbol.h │ │ ├── MKEndNamedSectionSymbol.m │ │ ├── MKGlobalSymbol.h │ │ ├── MKGlobalSymbol.m │ │ ├── MKIncludedFileNameSymbol.h │ │ ├── MKIncludedFileNameSymbol.m │ │ ├── MKObjectFileNameSymbol.h │ │ ├── MKObjectFileNameSymbol.m │ │ ├── MKProcedureSymbol.h │ │ ├── MKProcedureSymbol.m │ │ ├── MKSourceFileNameSymbol.h │ │ ├── MKSourceFileNameSymbol.m │ │ ├── MKStaticSymbol.h │ │ └── MKStaticSymbol.m │ ├── MKAbsoluteSymbol.h │ ├── MKAbsoluteSymbol.m │ ├── MKAliasSymbol.h │ ├── MKAliasSymbol.m │ ├── MKCommonSymbol.h │ ├── MKCommonSymbol.m │ ├── MKDebugSymbol.h │ ├── MKDebugSymbol.m │ ├── MKDefinedSymbol.h │ ├── MKDefinedSymbol.m │ ├── MKIndirectSymbol.h │ ├── MKIndirectSymbol.m │ ├── MKIndirectSymbolTable.h │ ├── MKIndirectSymbolTable.m │ ├── MKMachO+Symbols.h │ ├── MKMachO+Symbols.m │ ├── MKRegularSymbol.h │ ├── MKRegularSymbol.m │ ├── MKSectionSymbol.h │ ├── MKSectionSymbol.m │ ├── MKStringTable.h │ ├── MKStringTable.m │ ├── MKSymbol.h │ ├── MKSymbol.m │ ├── MKSymbolTable.h │ ├── MKSymbolTable.m │ ├── MKUndefinedSymbol.h │ ├── MKUndefinedSymbol.m │ └── Type │ │ ├── MKNodeFieldSTABType.h │ │ ├── MKNodeFieldSTABType.m │ │ ├── MKNodeFieldSymbolFlagsType.h │ │ ├── MKNodeFieldSymbolFlagsType.m │ │ ├── MKNodeFieldSymbolLibraryOrdinalType.h │ │ ├── MKNodeFieldSymbolLibraryOrdinalType.m │ │ ├── MKNodeFieldSymbolReferenceType.h │ │ ├── MKNodeFieldSymbolReferenceType.m │ │ ├── MKNodeFieldSymbolType.h │ │ ├── MKNodeFieldSymbolType.m │ │ └── MKSymbolsFieldType.h └── Type │ ├── MKMachOFieldType.h │ ├── MKNodeFieldMachOFileType.h │ ├── MKNodeFieldMachOFileType.m │ ├── MKNodeFieldMachOFlagsType.h │ ├── MKNodeFieldMachOFlagsType.m │ ├── MKNodeFieldVMProtectionType.h │ ├── MKNodeFieldVMProtectionType.m │ ├── MKNodeFieldVersionType.h │ └── MKNodeFieldVersionType.m ├── ReadMe.md ├── Resources ├── MachOKit-Info.plist ├── MachOKit-Prefix.pch ├── MachOKit-Tests-Info.plist └── MachOKit-Tests-Prefix.pch ├── Tests ├── Specs │ ├── MKDataModelSpec.m │ ├── MKFatSpec.m │ ├── MKFormatterSpec.m │ ├── MKMachOSpec.m │ ├── MKMemoryMapSpec.m │ ├── MKNumberSpec.m │ ├── MKSharedCacheSpec.m │ └── libMachO │ │ ├── core_spec.m │ │ ├── data_model_spec.m │ │ ├── macho_image_spec.m │ │ ├── macho_load_command_spec.m │ │ └── memory_map_spec.m └── Support │ ├── Binary.h │ ├── Binary.m │ ├── DyldInfoUtil.h │ ├── DyldInfoUtil.m │ ├── NMUtil.h │ ├── NMUtil.m │ ├── NSArray+MKTests.h │ ├── NSArray+MKTests.m │ ├── NSFileManager+MKTest.h │ ├── NSFileManager+MKTest.m │ ├── NSTask+MKTests.h │ ├── NSTask+MKTests.m │ ├── OtoolUtil.h │ └── OtoolUtil.m ├── libMachO.podspec └── libMachO ├── Architecture ├── architecture.c └── architecture.h ├── Core ├── Data_Model │ ├── data_model.c │ ├── data_model.h │ └── data_model_internal.h ├── Logging │ ├── logging.c │ ├── logging.h │ └── logging_internal.h ├── Memory │ ├── memory_map.c │ ├── memory_map.h │ ├── memory_map_internal.h │ ├── memory_map_self.c │ ├── memory_map_self.h │ ├── memory_map_task.c │ ├── memory_map_task.h │ ├── memory_object.c │ ├── memory_object.h │ └── memory_object_internal.h ├── context.c ├── context.h ├── core.c ├── core.h └── core_internal.h ├── MachO_ABI ├── Exports │ ├── export.c │ ├── export.h │ └── export_internal.h ├── LoadCommands │ ├── _load_command_dyld_info.c │ ├── _load_command_dyld_info.h │ ├── _load_command_dylib.c │ ├── _load_command_dylib.h │ ├── _load_command_dylinker.c │ ├── _load_command_dylinker.h │ ├── _load_command_linkedit.c │ ├── _load_command_linkedit.h │ ├── load_command_build_version.c │ ├── load_command_build_version.h │ ├── load_command_code_signature.c │ ├── load_command_code_signature.h │ ├── load_command_data_in_code.c │ ├── load_command_data_in_code.h │ ├── load_command_dsymtab.c │ ├── load_command_dsymtab.h │ ├── load_command_dyld_chained_fixups.c │ ├── load_command_dyld_chained_fixups.h │ ├── load_command_dyld_environment.c │ ├── load_command_dyld_environment.h │ ├── load_command_dyld_exports_trie.c │ ├── load_command_dyld_exports_trie.h │ ├── load_command_dyld_info.c │ ├── load_command_dyld_info.h │ ├── load_command_dyld_info_only.c │ ├── load_command_dyld_info_only.h │ ├── load_command_dylib_code_sign_drs.c │ ├── load_command_dylib_code_sign_drs.h │ ├── load_command_encryption_info.c │ ├── load_command_encryption_info.h │ ├── load_command_encryption_info_64.c │ ├── load_command_encryption_info_64.h │ ├── load_command_function_starts.c │ ├── load_command_function_starts.h │ ├── load_command_id_dylib.c │ ├── load_command_id_dylib.h │ ├── load_command_id_dylinker.c │ ├── load_command_id_dylinker.h │ ├── load_command_lazy_load_dylib.c │ ├── load_command_lazy_load_dylib.h │ ├── load_command_linker_option.c │ ├── load_command_linker_option.h │ ├── load_command_load_dylib.c │ ├── load_command_load_dylib.h │ ├── load_command_load_dylinker.c │ ├── load_command_load_dylinker.h │ ├── load_command_load_upward_dylib.c │ ├── load_command_load_upward_dylib.h │ ├── load_command_load_weak_dylib.c │ ├── load_command_load_weak_dylib.h │ ├── load_command_main.c │ ├── load_command_main.h │ ├── load_command_note.c │ ├── load_command_note.h │ ├── load_command_prebind_cksum.c │ ├── load_command_prebind_cksum.h │ ├── load_command_reexport_dylib.c │ ├── load_command_reexport_dylib.h │ ├── load_command_routines.c │ ├── load_command_routines.h │ ├── load_command_routines_64.c │ ├── load_command_routines_64.h │ ├── load_command_rpath.c │ ├── load_command_rpath.h │ ├── load_command_segment.c │ ├── load_command_segment.h │ ├── load_command_segment_64.c │ ├── load_command_segment_64.h │ ├── load_command_segment_split_info.c │ ├── load_command_segment_split_info.h │ ├── load_command_source_version.c │ ├── load_command_source_version.h │ ├── load_command_sub_client.c │ ├── load_command_sub_client.h │ ├── load_command_sub_framework.c │ ├── load_command_sub_framework.h │ ├── load_command_sub_library.c │ ├── load_command_sub_library.h │ ├── load_command_symtab.c │ ├── load_command_symtab.h │ ├── load_command_twolevel_hints.c │ ├── load_command_twolevel_hints.h │ ├── load_command_uuid.c │ ├── load_command_uuid.h │ ├── load_command_version_min_iphoneos.c │ ├── load_command_version_min_iphoneos.h │ ├── load_command_version_min_macosx.c │ ├── load_command_version_min_macosx.h │ ├── load_command_version_min_tvos.c │ ├── load_command_version_min_tvos.h │ ├── load_command_version_min_watchos.c │ └── load_command_version_min_watchos.h ├── MachTypes │ ├── _mach_lcstr.c │ ├── _mach_lcstr.h │ ├── _mach_trie.c │ └── _mach_trie.h ├── Segments │ ├── Sections │ │ ├── section.c │ │ ├── section.h │ │ └── section_internal.h │ ├── segment.c │ ├── segment.h │ └── segment_internal.h ├── Symbols │ ├── symbol.c │ ├── symbol.h │ └── symbol_internal.h ├── exports_trie.c ├── exports_trie.h ├── exports_trie_internal.h ├── indirect_symbol_table.c ├── indirect_symbol_table.h ├── indirect_symbol_table_internal.h ├── load_command.c ├── load_command.h ├── load_command_internal.h ├── macho_abi.h ├── macho_abi_internal.h ├── macho_image.c ├── macho_image.h ├── macho_image_internal.h ├── string_table.c ├── string_table.h ├── string_table_internal.h ├── symbol_table.c ├── symbol_table.h └── symbol_table_internal.h ├── base.h ├── internal.h ├── macho.c └── macho.h /.github/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeVaukz/MachO-Kit/ef5272fc3a6fe8b612df534ca1150f9733cd6c66/.github/banner.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS generated files # 2 | ###################### 3 | .DS_Store 4 | .DS_Store? 5 | ._* 6 | .Spotlight-V100 7 | .Trashes 8 | Icon? 9 | ehthumbs.db 10 | Thumbs.db 11 | 12 | # User specific Xcode files # 13 | ############################# 14 | *.xcworkspace 15 | *.xcuserdatad 16 | 17 | # Documentation # 18 | ################# 19 | html 20 | 21 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "External/expecta"] 2 | path = External/expecta 3 | url = https://github.com/specta/expecta.git 4 | [submodule "External/specta"] 5 | path = External/specta 6 | url = https://github.com/specta/specta.git 7 | [submodule "Configuration"] 8 | path = Configuration 9 | url = https://github.com/DeVaukz/xcconfigs.git 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2015 Devin Vaukz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /MachOKit/Bindings/MKBindActionThreadedBind.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKBindActionThreadedBind.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKBindActionThreadedBind : MKBindActionBind 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/Bindings/MKBindActionThreadedRebase.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKBindActionThreadedRebase.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKBindActionThreadedRebase : MKBindAction 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/Bindings/MKBindDoBind.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKBindDoBind.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | #import 33 | 34 | NS_ASSUME_NONNULL_BEGIN 35 | 36 | //----------------------------------------------------------------------------// 37 | @interface MKBindDoBind : MKBindCommand 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | -------------------------------------------------------------------------------- /MachOKit/Bindings/MKBindDone.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKBindDone.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKBindDone : MKBindCommand 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/Bindings/MKBindSetAddendSLEB.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKBindSetAddendSLEB.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKBindSetAddendSLEB : MKBindCommand { 37 | @package 38 | int64_t _addend; 39 | size_t _addendSLEBSize; 40 | } 41 | 42 | //! 43 | @property (nonatomic, readonly) int64_t addend; 44 | 45 | @end 46 | 47 | NS_ASSUME_NONNULL_END 48 | -------------------------------------------------------------------------------- /MachOKit/Bindings/MKBindSetDylibOrdinalImmediate.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKBindSetDylibOrdinalImmediate.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKBindSetDylibOrdinalImmediate : MKBindCommand 37 | 38 | //! Library ordinal 39 | @property (nonatomic, readonly) int64_t ordinal; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /MachOKit/Bindings/MKBindSetDylibSpecialImmediate.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKBindSetDylibSpecialImmediate.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKBindSetDylibSpecialImmediate : MKBindCommand 37 | 38 | //! Library ordinal 39 | @property (nonatomic, readonly) int64_t ordinal; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /MachOKit/Bindings/MKBindSetTypeImmediate.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKBindSetTypeImmediate.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKBindSetTypeImmediate : MKBindCommand 37 | 38 | //! The type of subsequent bindings. 39 | @property (nonatomic, readonly) uint8_t type; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /MachOKit/Bindings/MKBindThreadedApply.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKBindThreadedApply.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKBindThreadedApply : MKBindThreaded 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/Bindings/MKLazyBindingsInfo.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKLazyBindingsInfo.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKLazyBindingsInfo : MKBindingsInfo 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/Bindings/MKWeakBindingsInfo.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKWeakBindingsInfo.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKWeakBindingsInfo : MKBindingsInfo 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/Bindings/Type/MKBindingsFieldType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKBindingsFieldType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | #import 31 | #import 32 | -------------------------------------------------------------------------------- /MachOKit/CF/Sections/MKCFStringSection.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKCFStringSection.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | @class MKCFString; 34 | 35 | NS_ASSUME_NONNULL_BEGIN 36 | 37 | //----------------------------------------------------------------------------// 38 | @interface MKCFStringSection : MKSection { 39 | @package 40 | NSArray *_strings; 41 | } 42 | 43 | @property (nonatomic, readonly) NSArray *strings; 44 | 45 | @end 46 | 47 | NS_ASSUME_NONNULL_END 48 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Formatter/MKBooleanFormatter.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKBooleanFormatter.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | //----------------------------------------------------------------------------// 33 | @interface MKBooleanFormatter : NSFormatter 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Formatter/MKStringFormatter.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKStringFormatter.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | //----------------------------------------------------------------------------// 33 | //! An \c NSFormatter subclass that adds quotation marks around the input 34 | //! string. 35 | // 36 | @interface MKStringFormatter : NSFormatter 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Recipe/MKNodeFieldDataOperationExtractChildNodeData.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldDataOperationExtractNodeData.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | //----------------------------------------------------------------------------// 33 | @interface MKNodeFieldDataOperationExtractChildNodeData : NSObject 34 | 35 | + (instancetype)sharedInstance; 36 | 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Recipe/MKNodeFieldDataOperationExtractDynamicSubrange.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldDataOperationExtractDynamicSubrange.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | //----------------------------------------------------------------------------// 31 | @interface MKNodeFieldDataOperationExtractDynamicSubrange : NSObject 32 | 33 | + (instancetype)sharedInstance; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Recipe/MKNodeFieldOperationReadKeyPath.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldOperationReadKeyPath.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | //----------------------------------------------------------------------------// 33 | @interface MKNodeFieldOperationReadKeyPath : NSObject { 34 | @package 35 | NSString *_keyPath; 36 | } 37 | 38 | - (instancetype)initWithKeyPath:(nullable NSString*)keyPath NS_DESIGNATED_INITIALIZER; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Recipe/MKNodeFieldOperationReturnConstant.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldOperationReturnConstant.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | //----------------------------------------------------------------------------// 33 | @interface MKNodeFieldOperationReturnConstant : NSObject { 34 | @package 35 | id _constant; 36 | } 37 | 38 | - (instancetype)initWithConstant:(nullable id)constant NS_DESIGNATED_INITIALIZER; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Recipe/MKNodeFieldRecipe.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldRecipe.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | 31 | #import 32 | #import 33 | 34 | #import 35 | 36 | #import 37 | #import 38 | #import 39 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Recipe/MKNodeFieldValueRecipe.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldValueRecipe.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | @class MKResult; 31 | @class MKNodeField; 32 | @class MKNode; 33 | 34 | NS_ASSUME_NONNULL_BEGIN 35 | 36 | //----------------------------------------------------------------------------// 37 | @protocol MKNodeFieldValueRecipe 38 | 39 | - (MKResult*)valueForField:(MKNodeField*)field ofNode:(MKNode*)input; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Type/MKNodeFieldBooleanType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldBooleanType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | //----------------------------------------------------------------------------// 33 | @protocol MKNodeFieldBooleanType 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Type/MKNodeFieldCollectionType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldCollectionType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | 31 | NS_ASSUME_NONNULL_BEGIN 32 | 33 | //----------------------------------------------------------------------------// 34 | @protocol MKNodeFieldCollectionType 35 | 36 | @property (nonatomic, readonly, nullable) id elementType; 37 | 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Type/MKNodeFieldContainerType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldContainerType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | //----------------------------------------------------------------------------// 33 | //! A marker protocol denoting a type a value of which will contain other 34 | //! values, each with their own (possibly different) type. 35 | // 36 | @protocol MKNodeFieldContainerType 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Type/MKNodeFieldDateType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldDateType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | //----------------------------------------------------------------------------// 33 | @protocol MKNodeFieldDateType 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Type/MKNodeFieldEnumerationType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldEnumerationType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | typedef NSDictionary MKNodeFieldEnumerationElements; 33 | 34 | //----------------------------------------------------------------------------// 35 | @protocol MKNodeFieldEnumerationType 36 | 37 | @property (nonatomic, readonly) MKNodeFieldEnumerationElements *elements; 38 | 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Type/MKNodeFieldNodeType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldNodeType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | 31 | NS_ASSUME_NONNULL_BEGIN 32 | 33 | //----------------------------------------------------------------------------// 34 | @protocol MKNodeFieldNodeType 35 | 36 | @property (nonatomic, readonly, nullable) Class nodeClass; 37 | 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Type/MKNodeFieldPointerType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldPointerType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | //----------------------------------------------------------------------------// 33 | @protocol MKNodeFieldPointerType 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Type/MKNodeFieldStringType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldStringType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | //----------------------------------------------------------------------------// 33 | @protocol MKNodeFieldStringType 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Type/MKNodeFieldType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | @class MKNode; 31 | 32 | NS_ASSUME_NONNULL_BEGIN 33 | 34 | //----------------------------------------------------------------------------// 35 | @protocol MKNodeFieldType 36 | 37 | @property (nonatomic, readonly) NSString *name; 38 | 39 | @property (nonatomic, readonly, nullable) NSFormatter *formatter; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Type/MKNodeFieldTypeAddress.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldTypeAddress.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | 31 | NS_ASSUME_NONNULL_BEGIN 32 | 33 | //----------------------------------------------------------------------------// 34 | @interface MKNodeFieldTypeAddress : NSObject 35 | 36 | + (instancetype)sharedInstance; 37 | 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Type/MKNodeFieldTypeBoolean.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldTypeBoolean.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | #import 31 | 32 | NS_ASSUME_NONNULL_BEGIN 33 | 34 | //----------------------------------------------------------------------------// 35 | @interface MKNodeFieldTypeBoolean : NSObject 36 | 37 | + (instancetype)sharedInstance; 38 | 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Type/MKNodeFieldTypeDate.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldTypeDate.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | 31 | NS_ASSUME_NONNULL_BEGIN 32 | 33 | //----------------------------------------------------------------------------// 34 | @interface MKNodeFieldTypeDate : NSObject 35 | 36 | + (instancetype)sharedInstance; 37 | 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Type/MKNodeFieldTypeOffset.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldTypeOffset.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | 31 | NS_ASSUME_NONNULL_BEGIN 32 | 33 | //----------------------------------------------------------------------------// 34 | @interface MKNodeFieldTypeOffset : NSObject 35 | 36 | + (instancetype)sharedInstance; 37 | 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Type/MKNodeFieldTypeSize.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldTypeSize.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | 31 | NS_ASSUME_NONNULL_BEGIN 32 | 33 | //----------------------------------------------------------------------------// 34 | @interface MKNodeFieldTypeSize : NSObject 35 | 36 | + (instancetype)sharedInstance; 37 | 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | -------------------------------------------------------------------------------- /MachOKit/Core/Description/Type/MKNodeFieldTypeString.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldTypeString.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | 31 | NS_ASSUME_NONNULL_BEGIN 32 | 33 | //----------------------------------------------------------------------------// 34 | @interface MKNodeFieldTypeString : NSObject 35 | 36 | + (instancetype)sharedInstance; 37 | 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | -------------------------------------------------------------------------------- /MachOKit/Core/Memory/_MKFileMemoryMap.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file _MKFileMemoryMap.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | //----------------------------------------------------------------------------// 33 | @interface _MKFileMemoryMap : MKMemoryMap { 34 | NSURL *_fileURL; 35 | NSData *_fileData; 36 | } 37 | 38 | - (nullable instancetype)initWithURL:(NSURL*)fileURL error:(NSError**)error; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /MachOKit/Core/Memory/_MKTaskMemoryMap.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file _MKTaskMemoryMap.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | #include 31 | 32 | NS_ASSUME_NONNULL_BEGIN 33 | 34 | //----------------------------------------------------------------------------// 35 | @interface _MKTaskMemoryMap : MKMemoryMap { 36 | @package 37 | mach_port_t _task; 38 | } 39 | 40 | - (nullable instancetype)initWithTask:(mach_port_t)task error:(NSError**)error; 41 | 42 | @end 43 | 44 | NS_ASSUME_NONNULL_END 45 | -------------------------------------------------------------------------------- /MachOKit/DSC/Images/MKSharedCache+Images.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKSharedCache+Images.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | @class MKDSCImagesInfo; 34 | 35 | NS_ASSUME_NONNULL_BEGIN 36 | 37 | //----------------------------------------------------------------------------// 38 | @interface MKSharedCache (Images) 39 | 40 | //! The table listing all of the images present in the shared cache. 41 | @property (nonatomic, readonly) MKDSCImagesInfo *imagesInfo; 42 | 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | -------------------------------------------------------------------------------- /MachOKit/DSC/MKNode+SharedCache.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNode+SharedCache.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | @class MKSharedCache; 34 | 35 | NS_ASSUME_NONNULL_BEGIN 36 | 37 | //----------------------------------------------------------------------------// 38 | @interface MKNode (SharedCache) 39 | 40 | //! The nearest \ref MKSharedCache ancestor node. 41 | @property (nonatomic, readonly, nullable) MKSharedCache *sharedCache; 42 | 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | -------------------------------------------------------------------------------- /MachOKit/DSC/MKNode+SharedCache.m: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //| MKNode+SharedCache.m 5 | //| 6 | //| D.V. 7 | //| Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import "MKNode+SharedCache.h" 29 | #import "MKSharedCache.h" 30 | 31 | //----------------------------------------------------------------------------// 32 | @implementation MKNode (SharedCache) 33 | 34 | //|++++++++++++++++++++++++++++++++++++|// 35 | - (MKSharedCache*)sharedCache 36 | { return [self nearestAncestorOfType:MKSharedCache.class]; } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /MachOKit/DSC/Slide/MKSharedCache+Slide.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKSharedCache+Slide.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKSharedCache (Slide) 37 | 38 | //! 39 | @property (nonatomic, readonly, nullable) MKDSCSlideInfo *slideInfo; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /MachOKit/DSC/Symbols/MKSharedCache+Symbols.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKSharedCache+Symbols.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | @class MKDSCLocalSymbols; 34 | 35 | NS_ASSUME_NONNULL_BEGIN 36 | 37 | //----------------------------------------------------------------------------// 38 | @interface MKSharedCache (Symbols) 39 | 40 | //! 41 | @property (nonatomic, readonly) MKDSCLocalSymbols *localSymbols; 42 | 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | -------------------------------------------------------------------------------- /MachOKit/DataInCode/Type/MKDataInCodeFieldType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKDataInCodeFieldType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | -------------------------------------------------------------------------------- /MachOKit/Exports/MKRegularExport.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKRegularExport.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKRegularExport : MKExport { 37 | @package 38 | mk_vm_offset_t _address; 39 | } 40 | 41 | //! The VM address of the exported symbol. 42 | @property (nonatomic, readonly) mk_vm_address_t address; 43 | 44 | @end 45 | 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /MachOKit/Exports/Type/MKExportsFieldType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKExportsFieldType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | #import 31 | -------------------------------------------------------------------------------- /MachOKit/Exports/Type/MKNodeFieldExportFlagsType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldExportFlagsType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | #import 33 | 34 | NS_ASSUME_NONNULL_BEGIN 35 | 36 | //----------------------------------------------------------------------------// 37 | @interface MKNodeFieldExportFlagsType : MKNodeFieldTypeUnsignedQuadWord 38 | 39 | + (instancetype)sharedInstance; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /MachOKit/FunctionStarts/MKFunctionStartsContext.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKFunctionStartsContext.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | @class MKFunctionStarts; 29 | @class MKFunctionOffset; 30 | 31 | //----------------------------------------------------------------------------// 32 | struct MKFunctionStartsContext 33 | { 34 | mk_vm_address_t address; 35 | #if __has_feature(objc_arc) 36 | void *offset; 37 | void *info; 38 | #else 39 | MKFunctionOffset *offset; 40 | MKFunctionStarts *info; 41 | #endif 42 | }; 43 | -------------------------------------------------------------------------------- /MachOKit/Load_Commands/MKLCDataInCode.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKLCDataInCode.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | //! Parser for \c LC_DATA_IN_CODE. 37 | // 38 | @interface MKLCDataInCode : MKLinkEditDataLoadCommand 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /MachOKit/Load_Commands/MKLCDyldChainedFixups.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKLCDyldChainedFixups.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | //! Parser for \c LC_DYLD_CHAINED_FIXUPS. 37 | // 38 | @interface MKLCDyldChainedFixups : MKLinkEditDataLoadCommand 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /MachOKit/Load_Commands/MKLCDyldExportsTrie.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKLCDyldExportsTrie.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | //! Parser for \c LC_DYLD_EXPORTS_TRIE. 37 | // 38 | @interface MKLCDyldExportsTrie : MKLinkEditDataLoadCommand 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /MachOKit/Load_Commands/MKLCDyldInfoOnly.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKLCDyldInfoOnly.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | //! Parser for \c LC_DYLD_INFO_ONLY. 37 | // 38 | @interface MKLCDyldInfoOnly : MKLCDyldInfo 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /MachOKit/Load_Commands/MKLCDylibCodeSignDrs.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKLCDylibCodeSignDrs.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | //! Parser for \c LC_DYLIB_CODE_SIGN_DRS. 37 | // 38 | @interface MKLCDylibCodeSignDrs : MKLinkEditDataLoadCommand 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /MachOKit/Load_Commands/MKLCFunctionStarts.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKLCFunctionStarts.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | //! Parser for \c LC_FUNCTION_STARTS. 37 | // 38 | @interface MKLCFunctionStarts : MKLinkEditDataLoadCommand 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /MachOKit/Load_Commands/MKLCIDDylib.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKLCIDDylib.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | //! Parser for \c LC_ID_DYLIB. 37 | // 38 | @interface MKLCIDDylib : MKDylibLoadCommand 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /MachOKit/Load_Commands/MKLCIDDylib.m: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //| MKLCIDDylib.m 5 | //| 6 | //| D.V. 7 | //| Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import "MKLCIDDylib.h" 29 | 30 | //----------------------------------------------------------------------------// 31 | @implementation MKLCIDDylib 32 | 33 | //|++++++++++++++++++++++++++++++++++++|// 34 | + (uint32_t)ID 35 | { return LC_ID_DYLIB; } 36 | 37 | //|++++++++++++++++++++++++++++++++++++|// 38 | + (uint32_t)canInstantiateWithLoadCommandID:(uint32_t)commandID 39 | { 40 | if (self != MKLCIDDylib.class) 41 | return 0; 42 | 43 | return commandID == [self ID] ? 10 : 0; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /MachOKit/Load_Commands/MKLCIDDylinker.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKLCIDDylinker.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | //! Parser for \c LC_ID_DYLINKER. 37 | // 38 | @interface MKLCIDDylinker : MKDylinkerLoadCommand 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /MachOKit/Load_Commands/MKLCLoadDylib.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKLCLoadDylib.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | //! Parser for \c LC_LOAD_DYLIB. 37 | // 38 | @interface MKLCLoadDylib : MKDylibLoadCommand 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /MachOKit/Load_Commands/MKLCLoadDylinker.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKLCLoadDylinker.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | //! Parser for \c LC_LOAD_DYLINKER. 37 | // 38 | @interface MKLCLoadDylinker : MKDylinkerLoadCommand 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /MachOKit/Load_Commands/MKLCLoadUpwardDylib.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKLCLoadUpwardDylib.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | //! Parser for \c LC_LOAD_UPWARD_DYLIB. 37 | // 38 | @interface MKLCLoadUpwardDylib : MKDylibLoadCommand 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /MachOKit/Load_Commands/MKLCReExportDylib.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKLCReExportDylib.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | //! Parser for \c LC_REEXPORT_DYLIB. 37 | //! 38 | //! The reexport dylib command instructs the dynamic linker to load a dylib 39 | //! and reexport its symbols. 40 | // 41 | @interface MKLCReExportDylib : MKDylibLoadCommand 42 | @end 43 | 44 | NS_ASSUME_NONNULL_END 45 | -------------------------------------------------------------------------------- /MachOKit/Load_Commands/MKLCSegmentSplitInfo.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKLCSegmentSplitInfo.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | //! Parser for \c LC_SEGMENT_SPLIT_INFO. 37 | //! 38 | @interface MKLCSegmentSplitInfo : MKLinkEditDataLoadCommand 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /MachOKit/MKDylibVersion.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKDylibVersion.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKDylibVersion : MKVersion 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/MKDylibVersion.m: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //| MKDylibVersion.m 5 | //| 6 | //| D.V. 7 | //| Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import "MKDylibVersion.h" 29 | 30 | //----------------------------------------------------------------------------// 31 | @implementation MKDylibVersion 32 | 33 | //|++++++++++++++++++++++++++++++++++++|// 34 | - (NSString*)description 35 | { return [NSString stringWithFormat:@"%" PRIu16 ".%" PRIu8 ".%" PRIu8 "", self.major, self.minor, self.patch]; } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /MachOKit/MKNode+MachO.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNode+MachO.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | @class MKMachOImage; 34 | 35 | NS_ASSUME_NONNULL_BEGIN 36 | 37 | //----------------------------------------------------------------------------// 38 | @interface MKNode (MachO) 39 | 40 | //! The nearest \ref MKMachOImage ancestor node. 41 | @property (nonatomic, readonly, nullable) MKMachOImage *macho; 42 | 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | -------------------------------------------------------------------------------- /MachOKit/MKNode+MachO.m: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //| MKNode+MachO.m 5 | //| 6 | //| D.V. 7 | //| Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import "MKNode+MachO.h" 29 | #import "MKMachO.h" 30 | 31 | //----------------------------------------------------------------------------// 32 | @implementation MKNode (MachO) 33 | 34 | //|++++++++++++++++++++++++++++++++++++|// 35 | - (MKMachOImage*)macho 36 | { return [self nearestAncestorOfType:MKMachOImage.class]; } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /MachOKit/MachOKit.m: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //| MachOKit.m 5 | //| 6 | //| D.V. 7 | //| Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import "MachOKit.h" 29 | -------------------------------------------------------------------------------- /MachOKit/ObjC/Class/Type/MKObjCClassFieldType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKObjCClassFieldType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | -------------------------------------------------------------------------------- /MachOKit/ObjC/ImageInfo/Type/MKObjCImageInfoFieldType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKObjCImageInfoFieldType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | #import 31 | -------------------------------------------------------------------------------- /MachOKit/ObjC/Method/MKObjCClassMethodList.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKObjCClassMethodList.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | @class MKObjCClassMethod; 34 | 35 | NS_ASSUME_NONNULL_BEGIN 36 | 37 | //----------------------------------------------------------------------------// 38 | @interface MKObjCClassMethodList : MKObjCElementList 39 | 40 | #ifdef __swift__ 41 | + (Class)classForGenericArgumentAtIndex:(NSUInteger)index; 42 | #endif 43 | 44 | @end 45 | 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /MachOKit/ObjC/Method/MKObjCClassMethodList.m: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //| MKObjCClassMethodList.m 5 | //| 6 | //| D.V. 7 | //| Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import "MKObjCClassMethodList.h" 29 | #import "MKObjCClassMethod.h" 30 | 31 | //----------------------------------------------------------------------------// 32 | @implementation MKObjCClassMethodList 33 | 34 | //|++++++++++++++++++++++++++++++++++++|// 35 | + (Class)classForGenericArgumentAtIndex:(__unused NSUInteger)index 36 | { return MKObjCClassMethod.class; } 37 | 38 | //|++++++++++++++++++++++++++++++++++++|// 39 | + (uint32_t)flagsMask 40 | { return 3; } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /MachOKit/ObjC/Property/MKObjCClassPropertyList.m: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //| MKObjCClassPropertyList.m 5 | //| 6 | //| D.V. 7 | //| Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import "MKObjCClassPropertyList.h" 29 | #import "MKObjCClassProperty.h" 30 | 31 | //----------------------------------------------------------------------------// 32 | @implementation MKObjCClassPropertyList 33 | 34 | //|++++++++++++++++++++++++++++++++++++|// 35 | + (Class)classForGenericArgumentAtIndex:(__unused NSUInteger)index 36 | { return MKObjCClassProperty.class; } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /MachOKit/ObjC/Sections/MKObjCClassReferencesSection.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKObjCClassReferencesSection.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKObjCClassReferencesSection : MKPointerListSection 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/ObjC/Sections/MKObjCConstSection.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKObjCConstSection.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKObjCConstSection : MKDataSection 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/ObjC/Sections/MKObjCDataSection.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKObjCDataSection.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKObjCDataSection : MKDataSection 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/ObjC/Sections/MKObjCProtocolReferencesSection.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKObjCProtocolReferencesSection.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKObjCProtocolReferencesSection : MKPointerListSection 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/ObjC/Sections/MKObjCSuperReferencesSection.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKObjCSuperReferencesSection.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKObjCSuperReferencesSection : MKPointerListSection 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/ObjC/iVar/MKObjCClassIVarList.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKObjCClassIVarList.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | @class MKObjCClassIVar; 34 | 35 | NS_ASSUME_NONNULL_BEGIN 36 | 37 | //----------------------------------------------------------------------------// 38 | @interface MKObjCClassIVarList : MKObjCElementList 39 | 40 | #ifdef __swift__ 41 | + (Class)classForGenericArgumentAtIndex:(NSUInteger)index; 42 | #endif 43 | 44 | @end 45 | 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /MachOKit/ObjC/iVar/MKObjCClassIVarList.m: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //| MKObjCClassIVarList.m 5 | //| 6 | //| D.V. 7 | //| Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import "MKObjCClassIVarList.h" 29 | #import "MKObjCClassIVar.h" 30 | 31 | //----------------------------------------------------------------------------// 32 | @implementation MKObjCClassIVarList 33 | 34 | //|++++++++++++++++++++++++++++++++++++|// 35 | + (Class)classForGenericArgumentAtIndex:(__unused NSUInteger)index 36 | { return MKObjCClassIVar.class; } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /MachOKit/ObjC/iVar/MKObjCIVarOffset.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKObjCIVarOffset.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKObjCIVarOffset : MKOffsetNode { 37 | @package 38 | uint64_t _offset; 39 | } 40 | 41 | @property (nonatomic, readonly) uint64_t offset; 42 | 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | -------------------------------------------------------------------------------- /MachOKit/Rebase/MKRebaseContext.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKRebaseContext.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | @class MKRebaseInfo; 29 | @class MKRebaseCommand; 30 | 31 | //----------------------------------------------------------------------------// 32 | struct MKRebaseContext 33 | { 34 | mk_vm_offset_t actionStartOffset; 35 | mk_vm_size_t actionSize; 36 | uint8_t type; 37 | unsigned segmentIndex; 38 | mk_vm_offset_t offset; 39 | #if __has_feature(objc_arc) 40 | void *command; 41 | void *info; 42 | #else 43 | MKRebaseCommand *command; 44 | MKRebaseInfo *info; 45 | #endif 46 | }; 47 | -------------------------------------------------------------------------------- /MachOKit/Rebase/MKRebaseDone.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKRebaseDone.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKRebaseDone : MKRebaseCommand 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/Rebase/MKRebaseSetTypeImmediate.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKRebaseSetTypeImmediate.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKRebaseSetTypeImmediate : MKRebaseCommand 37 | 38 | //! The type of subsequent fixups. 39 | @property (nonatomic, readonly) uint8_t type; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /MachOKit/Rebase/Type/MKRebaseFieldType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKRebaseFieldType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | -------------------------------------------------------------------------------- /MachOKit/Segments/Sections/MKCStringSection.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKCStringSection.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | #import 33 | 34 | NS_ASSUME_NONNULL_BEGIN 35 | 36 | //----------------------------------------------------------------------------// 37 | @interface MKCStringSection : MKSection { 38 | @package 39 | NSArray *_strings; 40 | } 41 | 42 | @property (nonatomic, readonly) NSArray *strings; 43 | 44 | @end 45 | 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /MachOKit/Segments/Sections/MKDataSection.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKDataSection.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKDataSection : MKSection { 37 | @package 38 | NSMutableDictionary *_children; 39 | } 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /MachOKit/Segments/Sections/MKSectionIndirectSymbolTableIndexing.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKSectionIndirectSymbolTableIndexing.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | NS_ASSUME_NONNULL_BEGIN 32 | 33 | //----------------------------------------------------------------------------// 34 | @protocol MKSectionIndirectSymbolTableIndexing 35 | 36 | @property (nonatomic, readonly) NSRange indirectSymbolTableRange; 37 | 38 | @property (nonatomic, readonly) mk_vm_size_t indirectSymbolTableEntrySize; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /MachOKit/Segments/Sections/MKUStringSection.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKUStringSection.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | #import 33 | 34 | NS_ASSUME_NONNULL_BEGIN 35 | 36 | //----------------------------------------------------------------------------// 37 | @interface MKUStringSection : MKSection { 38 | @package 39 | NSArray *_strings; 40 | } 41 | 42 | @property (nonatomic, readonly) NSArray *strings; 43 | 44 | @end 45 | 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /MachOKit/Shared/MKLEB.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKLEB.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //! 36 | _mk_internal_extern bool 37 | MKULEBRead(MKBackedNode *node, mk_vm_offset_t offset, uint64_t *ULEBValue, size_t *ULEBSize, NSError **error); 38 | 39 | //! 40 | _mk_internal_extern bool 41 | MKSLEBRead(MKBackedNode *node, mk_vm_offset_t offset, int64_t *ULEBValue, size_t *ULEBSize, NSError **error); 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /MachOKit/Shared/MKString.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKString.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | NS_ASSUME_NONNULL_BEGIN 29 | 30 | //----------------------------------------------------------------------------// 31 | @protocol MKString 32 | 33 | @property (nonatomic, readonly, nullable) NSString *string; 34 | 35 | @end 36 | 37 | NS_ASSUME_NONNULL_END 38 | -------------------------------------------------------------------------------- /MachOKit/Shared/Memory/MKMemoryMap+Pointer.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKMemoryMap+Pointer.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKMemoryMap (Pointer) 37 | 38 | - (mk_vm_address_t)readPointerAtOffset:(mk_vm_offset_t)offset fromAddress:(mk_vm_address_t)contextAddress withDataModel:(MKDataModel*)dataModel error:(NSError**)error; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | 44 | -------------------------------------------------------------------------------- /MachOKit/Shared/Type/CPUType/MKNodeFieldCPUSubTypeFeatures.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKNodeFieldCPUSubTypeFeatures.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | #import 31 | 32 | NS_ASSUME_NONNULL_BEGIN 33 | 34 | //----------------------------------------------------------------------------// 35 | @interface MKNodeFieldCPUSubTypeFeatures : MKNodeFieldTypeDoubleWord 36 | 37 | + (instancetype)sharedInstance; 38 | 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /MachOKit/Shared/Type/MKSharedFieldType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKSharedFieldType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | #import 31 | #import 32 | #import 33 | #import 34 | #import 35 | #import 36 | #import 37 | #import 38 | -------------------------------------------------------------------------------- /MachOKit/SplitSegment/V1/MKSplitSegmentInfoV1Context.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKSplitSegmentInfoV1Context.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | @class MKSplitSegmentInfoV1Entry; 29 | @class MKSplitSegmentInfoV1Offset; 30 | 31 | //----------------------------------------------------------------------------// 32 | struct MKSplitSegmentInfoV1Context 33 | { 34 | mk_vm_address_t address; 35 | uint8_t type; 36 | #if __has_feature(objc_arc) 37 | void *offset; 38 | void *info; 39 | #else 40 | MKSplitSegmentInfoV1Offset *offset; 41 | MKSplitSegmentInfoV1Entry *info; 42 | #endif 43 | }; 44 | -------------------------------------------------------------------------------- /MachOKit/SplitSegment/V1/MKSplitSegmentInfoV1Opcode.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKSplitSegmentInfoV1Opcode.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKSplitSegmentInfoV1Opcode : MKOffsetNode { 37 | @package 38 | uint8_t _kind; 39 | } 40 | 41 | //! The opcode kind. 42 | @property (nonatomic, readonly) uint8_t kind; 43 | 44 | @end 45 | 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /MachOKit/SplitSegment/V1/Type/MKSplitSegmentInfoV1FieldType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKSplitSegmentInfoV1FieldType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | -------------------------------------------------------------------------------- /MachOKit/Symbols/DebugSymbols/MKASTSymbol.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKASTSymbol.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKASTSymbol : MKDebugSymbol 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/Symbols/DebugSymbols/MKBeginNamedSectionSymbol.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKBeginNamedSectionSymbol.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKBeginNamedSectionSymbol : MKDebugSymbol 37 | 38 | @property (nonatomic, readonly) mk_vm_address_t address; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /MachOKit/Symbols/DebugSymbols/MKGlobalSymbol.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKGlobalSymbol.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKGlobalSymbol : MKDebugSymbol 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /MachOKit/Symbols/DebugSymbols/MKIncludedFileNameSymbol.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKIncludedFileNameSymbol.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKIncludedFileNameSymbol : MKDebugSymbol 37 | 38 | //! The text address corresponding to the start of the included file. 39 | @property (nonatomic, readonly) mk_vm_address_t address; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /MachOKit/Symbols/DebugSymbols/MKStaticSymbol.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKStaticSymbol.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKStaticSymbol : MKDebugSymbol 37 | 38 | //! The address of the static variable. 39 | @property (nonatomic, readonly) mk_vm_address_t address; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /MachOKit/Symbols/MKAbsoluteSymbol.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKAbsoluteSymbol.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKAbsoluteSymbol : MKDefinedSymbol 37 | 38 | @property (nonatomic, readonly) uint64_t value; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /MachOKit/Symbols/MKDefinedSymbol.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKDefinedSymbol.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | #import 33 | 34 | NS_ASSUME_NONNULL_BEGIN 35 | 36 | //----------------------------------------------------------------------------// 37 | @interface MKDefinedSymbol : MKRegularSymbol 38 | 39 | //! Symbol flags. 40 | @property (nonatomic, readonly) MKDefinedSymbolFlagsType symbolFlags; 41 | 42 | @end 43 | 44 | NS_ASSUME_NONNULL_END 45 | -------------------------------------------------------------------------------- /MachOKit/Symbols/MKSectionSymbol.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKSectionSymbol.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include 29 | #import 30 | 31 | #import 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | //----------------------------------------------------------------------------// 36 | @interface MKSectionSymbol : MKDefinedSymbol 37 | 38 | //! The address of the symbol. 39 | @property (nonatomic, readonly) mk_vm_address_t address; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /MachOKit/Symbols/Type/MKSymbolsFieldType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKSymbolsFieldType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | #import 31 | #import 32 | #import 33 | -------------------------------------------------------------------------------- /MachOKit/Type/MKMachOFieldType.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file MKMachOFieldType.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | #import 30 | #import 31 | #import 32 | #import 33 | #import 34 | -------------------------------------------------------------------------------- /Resources/MachOKit-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(CURRENT_PROJECT_VERSION) 25 | NSHumanReadableCopyright 26 | Copyright © 2014-2015 DeVaukz. All rights reserved. 27 | NSPrincipalClass 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Resources/MachOKit-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | -------------------------------------------------------------------------------- /Resources/MachOKit-Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | net.devaukz.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Resources/MachOKit-Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #import 10 | 11 | #import 12 | 13 | #import 14 | #import 15 | 16 | #import "NSTask+MKTests.h" 17 | #import "NSFileManager+MKTest.h" 18 | #import "OtoolUtil.h" 19 | #import "DyldInfoUtil.h" 20 | #import "NMUtil.h" 21 | #import "Binary.h" 22 | #endif 23 | -------------------------------------------------------------------------------- /Tests/Support/NSTask+MKTests.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //| NSTask+MKTests.h 5 | //| 6 | //| D.V. 7 | //| Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #import 29 | 30 | #define OTOOL_PATH "/usr/bin/otool" 31 | #define XCRUN_PATH "/usr/bin/xcrun" 32 | #define SHELL_PATH "/bin/sh" 33 | 34 | //----------------------------------------------------------------------------// 35 | @interface NSTask (MKTests) 36 | 37 | + (NSString*)outputForLaunchedTaskWithLaunchPath:(NSString*)path arguments:(NSArray*)arguments; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /libMachO.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "libMachO" 3 | s.version = "0.1.1" 4 | s.summary = "libMachO is a lightweight, C library for parsing in-memory Mach-O images." 5 | 6 | s.description = <<-DESC 7 | libMachO is a lightweight, C library for parsing in-memory Mach-O images. 8 | It should not be used to parse binaries which have not been loaded into memory 9 | by the kernel/dyld. To keep the library lightweight libMachO overlays itself 10 | atop the MachO binary and provides a structured set of APIs to parse the data. 11 | libMachO does not build up its own independent representation of the Mach-O 12 | opting to continuously walk the Mach-O structures to access requested data. 13 | This means that libMachO generally expects well-formed MachO binaries. 14 | DESC 15 | 16 | s.homepage = "https://github.com/DeVaukz/MachO-Kit" 17 | s.license = 'MIT' 18 | s.author = { "Devin Vaukz" => "devin.vaukz@gmail.com" } 19 | s.source = { :git => "https://github.com/DeVaukz/MachO-Kit.git", :tag => s.version.to_s } 20 | 21 | s.ios.deployment_target = '7.0' 22 | s.osx.deployment_target = '10.6' 23 | s.watchos.deployment_target = '1.0' 24 | s.tvos.deployment_target = '9.0' 25 | 26 | s.source_files = 'libMachO/**/*' 27 | s.resources = 'libMachO/**/*' 28 | s.public_header_files = 'libMachO/macho.h' 29 | s.header_mappings_dir = 'libMachO/' 30 | 31 | s.xcconfig = { 32 | 'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/libMachO/**"', 33 | 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES' 34 | } 35 | 36 | s.pod_target_xcconfig = { 37 | 'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/libMachO/**"', 38 | 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES' 39 | } 40 | end -------------------------------------------------------------------------------- /libMachO/Core/context.c: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //| context.c 5 | //| 6 | //| D.V. 7 | //| Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include "core_internal.h" 29 | -------------------------------------------------------------------------------- /libMachO/MachO_ABI/MachTypes/_mach_trie.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //! @file _mach_trie.h 5 | //! 6 | //! @author D.V. 7 | //! @copyright Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #ifndef __mach_trie_h 29 | #define __mach_trie_h 30 | 31 | //! 32 | _mk_internal_extern mk_error_t 33 | _mk_mach_trie_copy_uleb128(const uint8_t* p, const uint8_t* end, 34 | uint64_t *output, size_t *output_len); 35 | 36 | //! 37 | _mk_internal_extern mk_error_t 38 | _mk_mach_trie_copy_sleb128(const uint8_t* p, const uint8_t* end, 39 | int64_t *output, size_t *output_len); 40 | 41 | #endif /* __mach_trie_h */ 42 | -------------------------------------------------------------------------------- /libMachO/macho.c: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------// 2 | //| 3 | //| MachOKit - A Lightweight Mach-O Parsing Library 4 | //| macho.c 5 | //| 6 | //| D.V. 7 | //| Copyright (c) 2014-2015 D.V. All rights reserved. 8 | //| 9 | //| Permission is hereby granted, free of charge, to any person obtaining a 10 | //| copy of this software and associated documentation files (the "Software"), 11 | //| to deal in the Software without restriction, including without limitation 12 | //| the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 | //| and/or sell copies of the Software, and to permit persons to whom the 14 | //| Software is furnished to do so, subject to the following conditions: 15 | //| 16 | //| The above copyright notice and this permission notice shall be included 17 | //| in all copies or substantial portions of the Software. 18 | //| 19 | //| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | //| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | //| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | //| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | //| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | //| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | //| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | //----------------------------------------------------------------------------// 27 | 28 | #include "macho.h" 29 | --------------------------------------------------------------------------------