Struct DyldCacheHeader
struct DyldCacheHeader<E: Endian> { ... }
The dyld cache header. Corresponds to struct dyld_cache_header from dyld_cache_format.h. This header has grown over time. Only the fields up to and including dyld_base_address are guaranteed to be present. For all other fields, check the header size before accessing the field. The header size is stored in mapping_offset; the mappings start right after the theader.
Fields
magic: [u8; 16]e.g. "dyld_v0 i386"
mapping_offset: crate::endian::U32<E>file offset to first dyld_cache_mapping_info
mapping_count: crate::endian::U32<E>number of dyld_cache_mapping_info entries
images_offset: crate::endian::U32<E>file offset to first dyld_cache_image_info
images_count: crate::endian::U32<E>number of dyld_cache_image_info entries
dyld_base_address: crate::endian::U64<E>base address of dyld when cache was built
local_symbols_offset: crate::endian::U64<E>file offset of where local symbols are stored
local_symbols_size: crate::endian::U64<E>size of local symbols information
uuid: [u8; 16]unique value for each shared cache file
subcaches_offset: crate::endian::U32<E>file offset to first dyld_subcache_info
subcaches_count: crate::endian::U32<E>number of dyld_subcache_info entries
symbols_subcache_uuid: [u8; 16]the UUID of the .symbols subcache
images_across_all_subcaches_offset: crate::endian::U32<E>file offset to first dyld_cache_image_info Use this instead of images_offset if mapping_offset is at least 0x1c4.
images_across_all_subcaches_count: crate::endian::U32<E>number of dyld_cache_image_info entries Use this instead of images_count if mapping_offset is at least 0x1c4.
Implementations
impl<E: Endian> macho::DyldCacheHeader<E>
fn parse<'data, R: ReadRef<'data>>(data: R) -> Result<&'data Self>Read the dyld cache header.
fn parse_magic(self: &Self) -> Result<(Architecture, E)>Returns (arch, endian) based on the magic string.
fn mappings<'data, R: ReadRef<'data>>(self: &Self, endian: E, data: R) -> Result<&'data [macho::DyldCacheMappingInfo<E>]>Return the mapping information table.
fn subcaches<'data, R: ReadRef<'data>>(self: &Self, endian: E, data: R) -> Result<Option<DyldSubCacheSlice<'data, E>>>Return the information about subcaches, if present.
Returns
Nonefor dyld caches produced before dyld-940 (macOS 12).fn symbols_subcache_uuid(self: &Self, endian: E) -> Option<[u8; 16]>Return the UUID for the .symbols subcache, if present.
fn images<'data, R: ReadRef<'data>>(self: &Self, endian: E, data: R) -> Result<&'data [macho::DyldCacheImageInfo<E>]>Return the image information table.
impl<E> Freeze for DyldCacheHeader<E>
impl<E> RefUnwindSafe for DyldCacheHeader<E>
impl<E> Send for DyldCacheHeader<E>
impl<E> Sync for DyldCacheHeader<E>
impl<E> Unpin for DyldCacheHeader<E>
impl<E> UnwindSafe for DyldCacheHeader<E>
impl<E: $crate::clone::Clone + Endian> Clone for DyldCacheHeader<E>
fn clone(self: &Self) -> DyldCacheHeader<E>
impl<E: $crate::fmt::Debug + Endian> Debug for DyldCacheHeader<E>
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl<E: $crate::marker::Copy + Endian> Copy for DyldCacheHeader<E>
impl<E: Endian> Pod for DyldCacheHeader<E>
impl<T> Any for DyldCacheHeader<E>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for DyldCacheHeader<E>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for DyldCacheHeader<E>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for DyldCacheHeader<E>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for DyldCacheHeader<E>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for DyldCacheHeader<E>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for DyldCacheHeader<E>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for DyldCacheHeader<E>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for DyldCacheHeader<E>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>