pub struct ObjCResolver<'data> { /* private fields */ }Expand description
Resolves pointers in ObjC metadata, handling chained fixups.
For arm64e binaries, raw pointer values in metadata sections are chained fixup entries, not actual addresses. This resolver maps file offsets to their resolved targets.
Implementations§
Source§impl<'data> ObjCResolver<'data>
impl<'data> ObjCResolver<'data>
Sourcepub fn read_pointer_at_offset(&self, file_offset: u64) -> Result<Option<Va>>
pub fn read_pointer_at_offset(&self, file_offset: u64) -> Result<Option<Va>>
Read a pointer at a file offset, resolving chained fixups. Returns the resolved VA target, or None if it’s an external bind.
Sourcepub fn read_pointer_at_va(&self, va: Va) -> Result<Option<Va>>
pub fn read_pointer_at_va(&self, va: Va) -> Result<Option<Va>>
Read a pointer at a VA, resolving chained fixups.
Sourcepub fn read_cstring(&self, va: Va) -> Result<&'data str>
pub fn read_cstring(&self, va: Va) -> Result<&'data str>
Read a C string at a VA.
Sourcepub fn va_to_offset(&self, va: Va) -> Result<ThinFileOffset>
pub fn va_to_offset(&self, va: Va) -> Result<ThinFileOffset>
Get the file offset for a VA.
Sourcepub fn bind_name_at_offset(&self, file_offset: u64) -> Option<&str>
pub fn bind_name_at_offset(&self, file_offset: u64) -> Option<&str>
Get the import name if a fixup at this file offset is a bind.
Sourcepub fn pointer_provenance_at_offset(
&self,
file_offset: u64,
) -> ObjCPointerProvenance
pub fn pointer_provenance_at_offset( &self, file_offset: u64, ) -> ObjCPointerProvenance
Reports how a pointer field is represented without resolving or discarding its fixup source.
Sourcepub fn image_base(&self) -> u64
pub fn image_base(&self) -> u64
Performs image_base.
Auto Trait Implementations§
impl<'data> Freeze for ObjCResolver<'data>
impl<'data> RefUnwindSafe for ObjCResolver<'data>
impl<'data> Send for ObjCResolver<'data>
impl<'data> Sync for ObjCResolver<'data>
impl<'data> Unpin for ObjCResolver<'data>
impl<'data> UnsafeUnpin for ObjCResolver<'data>
impl<'data> UnwindSafe for ObjCResolver<'data>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more