pub struct Binary { /* private fields */ }
Expand description
This is the main interface to read and write Mach-O binary attributes.
Note that this structure implements the generic::Binary
trait from which other generic
functions are exposed
Implementations§
§impl Binary
impl Binary
pub fn commands(&self) -> CommandsIter<'_> ⓘ
pub fn commands(&self) -> CommandsIter<'_> ⓘ
Return an iterator over the different crate::macho::Commands
used by the
Mach-O binary
pub fn sections(&self) -> Sections<'_> ⓘ
pub fn sections(&self) -> Sections<'_> ⓘ
Return an iterator over the different crate::macho::Section
of the binary
pub fn segments(&self) -> Segments<'_> ⓘ
pub fn segments(&self) -> Segments<'_> ⓘ
Return an iterator over the different crate::macho::commands::Segment
(LC_SEGMENT/LC_SIGNATURE
)
of the binary.
pub fn libraries(&self) -> Libraries<'_> ⓘ
pub fn libraries(&self) -> Libraries<'_> ⓘ
Return an iterator over the crate::macho::commands::Dylib
used by this binary
pub fn relocations(&self) -> Relocations<'_> ⓘ
pub fn relocations(&self) -> Relocations<'_> ⓘ
Return an iterator over the different crate::macho::Relocation
of this binary
pub fn symbols(&self) -> Symbols<'_> ⓘ
pub fn symbols(&self) -> Symbols<'_> ⓘ
Return an iterator over the different crate::macho::Symbol
of this binary
pub fn dyld_info(&self) -> Option<DyldInfo<'_>>
pub fn dyld_info(&self) -> Option<DyldInfo<'_>>
Return the LC_DYLD_INFO/LC_DYLD_INFO_ONLY
command if present
pub fn main_command(&self) -> Option<Main<'_>>
pub fn main_command(&self) -> Option<Main<'_>>
Return the LC_MAIN
command if present
pub fn dylinker(&self) -> Option<Dylinker<'_>>
pub fn dylinker(&self) -> Option<Dylinker<'_>>
Return the LC_LOAD_DYLINKER/LC_ID_DYLINKER
command if present
pub fn function_starts(&self) -> Option<FunctionStarts<'_>>
pub fn function_starts(&self) -> Option<FunctionStarts<'_>>
Return the LC_FUNCTION_STARTS
command if present
pub fn source_version(&self) -> Option<SourceVersion<'_>>
pub fn source_version(&self) -> Option<SourceVersion<'_>>
Return the LC_SOURCE_VERSION
command if present
pub fn thread_command(&self) -> Option<ThreadCommand<'_>>
pub fn thread_command(&self) -> Option<ThreadCommand<'_>>
Return the LC_THREAD/LC_UNIXTHREAD
command if present
pub fn symbol_command(&self) -> Option<SymbolCommand<'_>>
pub fn symbol_command(&self) -> Option<SymbolCommand<'_>>
Return the LC_SYMTAB
command if present
pub fn dynamic_symbol(&self) -> Option<DynamicSymbolCommand<'_>>
pub fn dynamic_symbol(&self) -> Option<DynamicSymbolCommand<'_>>
Return the LC_DYSYMTAB
command if present
pub fn code_signature(&self) -> Option<CodeSignature<'_>>
pub fn code_signature(&self) -> Option<CodeSignature<'_>>
Return the LC_CODE_SIGNATURE
command if present
pub fn code_signature_dir(&self) -> Option<CodeSignatureDir<'_>>
pub fn code_signature_dir(&self) -> Option<CodeSignatureDir<'_>>
Return the LC_DYLIB_CODE_SIGN_DRS
command if present
pub fn data_in_code(&self) -> Option<DataInCode<'_>>
pub fn data_in_code(&self) -> Option<DataInCode<'_>>
Return the LC_DATA_IN_CODE
command if present
pub fn segment_split_info(&self) -> Option<SegmentSplitInfo<'_>>
pub fn segment_split_info(&self) -> Option<SegmentSplitInfo<'_>>
Return the LC_SEGMENT_SPLIT_INFO
command if present
pub fn encryption_info(&self) -> Option<EncryptionInfo<'_>>
pub fn encryption_info(&self) -> Option<EncryptionInfo<'_>>
Return the LC_ENCRYPTION_INFO/LC_ENCRYPTION_INFO_64
command if present
pub fn sub_framework(&self) -> Option<SubFramework<'_>>
pub fn sub_framework(&self) -> Option<SubFramework<'_>>
Return the LC_SUB_FRAMEWORK
command if present
pub fn dyld_environment(&self) -> Option<DyldEnvironment<'_>>
pub fn dyld_environment(&self) -> Option<DyldEnvironment<'_>>
Return the LC_DYLD_ENVIRONMENT
command if present
pub fn build_version(&self) -> Option<BuildVersion<'_>>
pub fn build_version(&self) -> Option<BuildVersion<'_>>
Return the LC_BUILD_VERSION
command if present
pub fn dyld_chained_fixups(&self) -> Option<DyldChainedFixups<'_>>
pub fn dyld_chained_fixups(&self) -> Option<DyldChainedFixups<'_>>
Return the LC_DYLD_CHAINED_FIXUPS
command if present
pub fn dyld_exports_trie(&self) -> Option<DyldExportsTrie<'_>>
pub fn dyld_exports_trie(&self) -> Option<DyldExportsTrie<'_>>
Return the LC_DYLD_EXPORTS_TRIE
command if present
pub fn two_level_hints(&self) -> Option<TwoLevelHints<'_>>
pub fn two_level_hints(&self) -> Option<TwoLevelHints<'_>>
Return the LC_TWOLEVEL_HINTS
command if present
pub fn linker_opt_hint(&self) -> Option<LinkerOptHint<'_>>
pub fn linker_opt_hint(&self) -> Option<LinkerOptHint<'_>>
Return the LC_LINKER_OPTIMIZATION_HINT
command if present
pub fn version_min(&self) -> Option<VersionMin<'_>>
pub fn version_min(&self) -> Option<VersionMin<'_>>
Return the LC_VERSION_MIN_MACOSX/VERSION_MIN_IPHONEOS
command if present
pub fn support_arm64_ptr_auth(&self) -> bool
pub fn support_arm64_ptr_auth(&self) -> bool
Check if the binary is supporting ARM64 pointer authentication (arm64e)
pub fn objc_metadata(&self) -> Option<Metadata<'_>>
pub fn objc_metadata(&self) -> Option<Metadata<'_>>
Return Objective-C metadata if present
Trait Implementations§
§impl Binary for Binary
impl Binary for Binary
§fn entrypoint(&self) -> u64
fn entrypoint(&self) -> u64
§fn original_size(&self) -> u64
fn original_size(&self) -> u64
§fn debug_info(&self) -> Option<DebugInfo<'_>>
fn debug_info(&self) -> Option<DebugInfo<'_>>
crate::pdb::DebugInfo
or crate::dwarf::DebugInfo
. Read more