Struct object::macho::DyldCacheHeader
source · [−]#[repr(C)]pub struct DyldCacheHeader<E: Endian> {
pub magic: [u8; 16],
pub mapping_offset: U32<E>,
pub mapping_count: U32<E>,
pub images_offset: U32<E>,
pub images_count: U32<E>,
pub dyld_base_address: U64<E>,
}
Expand description
The dyld cache header, containing only the fields which are present in all versions of dyld caches (dyld-95.3 and up). Many more fields exist in later dyld versions, but we currently do not need to parse those. Corresponds to struct dyld_cache_header from dyld_cache_format.h.
Fields
magic: [u8; 16]
e.g. “dyld_v0 i386”
mapping_offset: U32<E>
file offset to first dyld_cache_mapping_info
mapping_count: U32<E>
number of dyld_cache_mapping_info entries
images_offset: U32<E>
file offset to first dyld_cache_image_info
images_count: U32<E>
number of dyld_cache_image_info entries
dyld_base_address: U64<E>
base address of dyld when cache was built
Implementations
sourceimpl<E: Endian> DyldCacheHeader<E>
impl<E: Endian> DyldCacheHeader<E>
sourcepub fn parse<'data, R: ReadRef<'data>>(data: R) -> Result<&'data Self>
pub fn parse<'data, R: ReadRef<'data>>(data: R) -> Result<&'data Self>
Read the dyld cache header.
sourcepub fn parse_magic(&self) -> Result<(Architecture, E)>
pub fn parse_magic(&self) -> Result<(Architecture, E)>
Returns (arch, endian) based on the magic string.
Trait Implementations
sourceimpl<E: Clone + Endian> Clone for DyldCacheHeader<E>
impl<E: Clone + Endian> Clone for DyldCacheHeader<E>
sourcefn clone(&self) -> DyldCacheHeader<E>
fn clone(&self) -> DyldCacheHeader<E>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<E: Debug + Endian> Debug for DyldCacheHeader<E>
impl<E: Debug + Endian> Debug for DyldCacheHeader<E>
impl<E: Copy + Endian> Copy for DyldCacheHeader<E>
impl<E: Endian> Pod for DyldCacheHeader<E>
Auto Trait Implementations
impl<E> RefUnwindSafe for DyldCacheHeader<E> where
E: RefUnwindSafe,
impl<E> Send for DyldCacheHeader<E> where
E: Send,
impl<E> Sync for DyldCacheHeader<E> where
E: Sync,
impl<E> Unpin for DyldCacheHeader<E> where
E: Unpin,
impl<E> UnwindSafe for DyldCacheHeader<E> where
E: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more