Skip to content

Commit

Permalink
macho: reorder dyld cache definitions (#753)
Browse files Browse the repository at this point in the history
No actual code changes.
  • Loading branch information
philipc authored Jan 5, 2025
1 parent 4f55dd7 commit 38f0a31
Show file tree
Hide file tree
Showing 2 changed files with 533 additions and 533 deletions.
22 changes: 11 additions & 11 deletions src/macho.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,17 @@ pub struct DyldCacheMappingAndSlideInfo<E: Endian> {
pub init_prot: U32<E>,
}

/// Corresponds to struct dyld_cache_image_info from dyld_cache_format.h.
#[derive(Debug, Clone, Copy)]
#[repr(C)]
pub struct DyldCacheImageInfo<E: Endian> {
pub address: U64<E>,
pub mod_time: U64<E>,
pub inode: U64<E>,
pub path_file_offset: U32<E>,
pub pad: U32<E>,
}

/// Corresponds to struct dyld_cache_slide_info5 from dyld_cache_format.h.
#[derive(Debug, Clone, Copy)]
#[repr(C)]
Expand All @@ -513,17 +524,6 @@ pub struct DyldCacheSlideInfo5<E: Endian> {

pub const DYLD_CACHE_SLIDE_V5_PAGE_ATTR_NO_REBASE: u16 = 0xFFFF; // page has no rebasing

/// Corresponds to struct dyld_cache_image_info from dyld_cache_format.h.
#[derive(Debug, Clone, Copy)]
#[repr(C)]
pub struct DyldCacheImageInfo<E: Endian> {
pub address: U64<E>,
pub mod_time: U64<E>,
pub inode: U64<E>,
pub path_file_offset: U32<E>,
pub pad: U32<E>,
}

/// Corresponds to struct dyld_cache_slide_pointer5 from dyld_cache_format.h.
#[derive(Debug, Clone, Copy)]
pub struct DyldCacheSlidePointer5(pub u64);
Expand Down
Loading

0 comments on commit 38f0a31

Please sign in to comment.