Expand description
Module for Dyld shared cache support
Getting Started
let dyld_cache = lief::dsc::from_path("macos-15.0.1/");
for dylib in dyld_cache.libraries() {
println!("0x{:016x}: {}", dylib.address(), dylib.path());
let macho: lief::macho::Binary = dylib.get().expect("Can't get Mach-O representation");
}
Performance Considerations
If you aim at extracting several libraries from a dyld shared cache, it is
highly recommended to enable caching. Otherwise, performances can be
impacted.
See: crate::dsc::enable_cache
and crate::dsc::enable_cache_from_dir
Modules
Structs
- This struct interfaces a dyld shared cache file.
- This structure represents a library embedded in a dyld shared cache. It mirrors the original
dyld_cache_image_info
structure. - This structure represents a
dyld_cache_mapping_info
entry. - This class represents a subcache in the case of large/split dyld shared cache.
Functions
- Enable globally cache/memoization. One can also leverage this function by setting the environment variable
DYLDSC_ENABLE_CACHE
to1
- Same behavior as
enable_cache
but with a user-provided cache directory - Load a shared cache from a single file or from a directory specified by the
path
parameter.
Type Aliases
- UUID used in different places of the shared cache