LIEF: Library to Instrument Executable Formats Version 0.17.0
|
Namespace related to the dyld shared cache support. More...
Namespaces | |
namespace | details |
Classes | |
class | DyldSharedCache |
This class represents a dyld shared cache file. More... | |
class | Dylib |
This class represents a library embedded in a dyld shared cache. It mirrors the original dyld_cache_image_info structure. More... | |
class | MappingInfo |
This class represents a dyld_cache_mapping_info entry. More... | |
class | SubCache |
This class represents a subcache in the case of large/split dyld shared cache. More... |
Typedefs | |
using | sc_uuid_t = std::array<uint8_t, 16> |
UUID used in different places of the shared cache. |
Functions | |
bool | enable_cache () |
Enable globally cache/memoization. One can also leverage this function by setting the environment variable DYLDSC_ENABLE_CACHE to 1. | |
bool | enable_cache (const std::string &dir) |
Same behavior as enable_cache() but with a user-provided cache directory. | |
std::unique_ptr< DyldSharedCache > | load (const std::string &path, const std::string &arch="") |
Load a shared cache from a single file or from a directory specified by the path parameter. | |
std::unique_ptr< DyldSharedCache > | load (const std::vector< std::string > &files) |
Load a shared cache from a list of files. | |
bool | is_shared_cache (BinaryStream &stream) |
Check if the given stream wraps a Dyld Shared Cache. | |
bool | is_shared_cache (const std::string &file) |
Check if the file is a dyld shared cache. | |
bool | is_shared_cache (const uint8_t *buffer, size_t size) |
Check if the given buffer points to a dyld shared cache file. | |
bool | is_shared_cache (const std::vector< uint8_t > &buffer) |
Check if the given buffer points to a dyld shared cache file. |
Namespace related to the dyld shared cache support.
using LIEF::dsc::sc_uuid_t = std::array<uint8_t, 16> |
UUID used in different places of the shared cache.
bool LIEF::dsc::enable_cache | ( | ) |
Enable globally cache/memoization. One can also leverage this function by setting the environment variable DYLDSC_ENABLE_CACHE to 1.
By default, LIEF will use the directory specified by the environment variable DYLDSC_CACHE_DIR as its cache-root directory:
Otherwise, if DYLDSC_CACHE_DIR is not set, LIEF will use the following directory (in this priority):
References LIEF_API.
bool LIEF::dsc::enable_cache | ( | const std::string & | dir | ) |
Same behavior as enable_cache() but with a user-provided cache directory.
References LIEF_API.
bool LIEF::dsc::is_shared_cache | ( | BinaryStream & | stream | ) |
Check if the given stream wraps a Dyld Shared Cache.
References LIEF_API.
Referenced by is_shared_cache(), is_shared_cache(), and is_shared_cache().
|
inline |
Check if the file is a dyld shared cache.
References LIEF::FileStream::from_file(), and is_shared_cache().
|
inline |
Check if the given buffer points to a dyld shared cache file.
References is_shared_cache().
|
inline |
Check if the given buffer points to a dyld shared cache file.
References is_shared_cache().
|
inline |
Load a shared cache from a single file or from a directory specified by the path
parameter.
In the case where multiple architectures are available in the path
directory, the arch
parameter can be used to define which architecture should be prefered.
Example:
References LIEF::dsc::DyldSharedCache::from_path().
|
inline |
Load a shared cache from a list of files.
References LIEF::dsc::DyldSharedCache::from_files().