Struct object::macho::DyldCacheHeader[][src]

#[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

impl<E: Endian> DyldCacheHeader<E>[src]

pub fn parse<'data, R: ReadRef<'data>>(data: R) -> Result<&'data Self>[src]

Read the dyld cache header.

pub fn parse_magic(&self) -> Result<(Architecture, E)>[src]

Returns (arch, endian) based on the magic string.

pub fn mappings<'data, R: ReadRef<'data>>(
    &self,
    endian: E,
    data: R
) -> Result<&'data [DyldCacheMappingInfo<E>]>
[src]

Return the mapping information table.

pub fn images<'data, R: ReadRef<'data>>(
    &self,
    endian: E,
    data: R
) -> Result<&'data [DyldCacheImageInfo<E>]>
[src]

Return the image information table.

Trait Implementations

impl<E: Clone + Endian> Clone for DyldCacheHeader<E>[src]

fn clone(&self) -> DyldCacheHeader<E>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<E: Debug + Endian> Debug for DyldCacheHeader<E>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<E: Copy + Endian> Copy for DyldCacheHeader<E>[src]

impl<E: Endian> Pod for DyldCacheHeader<E>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.