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. | |
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):
DARWIN_USER_TEMP_DIR
/ DARWIN_USER_CACHE_DIR
+ /dyld_shared_cache
${XDG_CACHE_HOME}/dyld_shared_cache
LOCALAPPDATA%\dyld_shared_cache
$HOME/.dyld_shared_cache
USERPROFILE%\.dyld_shared_cache
bool LIEF::dsc::enable_cache | ( | const std::string & | dir | ) |
Same behavior as enable_cache() but with a user-provided cache directory.
|
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().