LIEF: Library to Instrument Executable Formats Version 0.16.0
|
This class represents a library embedded in a dyld shared cache. It mirrors the original dyld_cache_image_info
structure.
More...
#include <Dylib.hpp>
Classes | |
struct | extract_opt_t |
This structure is used to tweak the extraction process while calling Dylib::get. These options allow to deoptimize the dylib and get an accurate representation of the origin Mach-O binary. More... | |
class | Iterator |
Dylib Iterator. More... | |
Public Member Functions | |
Dylib (std::unique_ptr< details::Dylib > impl) | |
~Dylib () | |
std::string | path () const |
Original path of the library (e.g. /usr/lib/libcryptex.dylib ) | |
uint64_t | address () const |
In-memory address of the library. | |
uint64_t | modtime () const |
Modification time of the library matching stat.st_mtime , or 0. | |
uint64_t | inode () const |
File serial number matching stat.st_ino or 0. | |
uint64_t | padding () const |
Padding alignment value (should be 0) | |
std::unique_ptr< LIEF::MachO::Binary > | get (const extract_opt_t &opt=extract_opt_t()) const |
Get a MachO::Binary representation for this Dylib. | |
This class represents a library embedded in a dyld shared cache. It mirrors the original dyld_cache_image_info
structure.
LIEF::dsc::Dylib::Dylib | ( | std::unique_ptr< details::Dylib > | impl | ) |
LIEF::dsc::Dylib::~Dylib | ( | ) |
uint64_t LIEF::dsc::Dylib::address | ( | ) | const |
In-memory address of the library.
std::unique_ptr< LIEF::MachO::Binary > LIEF::dsc::Dylib::get | ( | const extract_opt_t & | opt = extract_opt_t() | ) | const |
Get a MachO::Binary representation for this Dylib.
One can use this function to write back the Mach-O binary on the disk:
uint64_t LIEF::dsc::Dylib::inode | ( | ) | const |
File serial number matching stat.st_ino
or 0.
Note that for shared cache targeting iOS, this value can hold a hash of the path (if modtime is set to 0)
uint64_t LIEF::dsc::Dylib::modtime | ( | ) | const |
Modification time of the library matching stat.st_mtime
, or 0.
uint64_t LIEF::dsc::Dylib::padding | ( | ) | const |
Padding alignment value (should be 0)
std::string LIEF::dsc::Dylib::path | ( | ) | const |
Original path of the library (e.g. /usr/lib/libcryptex.dylib
)