|
LIEF: Library to Instrument Executable Formats Version 0.17.1
|
Class which represent a Mach-O (fat) binary This object is also used for representing Mach-O binaries that are NOT FAT. More...
#include <FatBinary.hpp>
Public Types | |
| using | binaries_t = std::vector<std::unique_ptr<Binary>> |
| Internal containter used to store Binary objects within a Fat Mach-O. | |
| using | it_binaries = ref_iterator<binaries_t&, Binary*> |
| Iterator that outputs Binary&. | |
| using | it_const_binaries = const_ref_iterator<const binaries_t&, Binary*> |
| Iterator that outputs const Binary&. | |
Public Member Functions | |
| FatBinary (const FatBinary &)=delete | |
| FatBinary & | operator= (const FatBinary &)=delete |
| virtual | ~FatBinary () |
| size_t | size () const |
| Number of MachO::Binary wrapped by this object. | |
| bool | empty () const |
| Checks whether this object contains MachO::Binary. | |
| it_binaries | begin () |
| it_const_binaries | begin () const |
| it_binaries | end () |
| it_const_binaries | end () const |
| void | release_all_binaries () |
| std::unique_ptr< Binary > | pop_back () |
| Get a pointer to the last MachO::Binary object presents in this Fat Binary. It returns a nullptr if no binary are present. | |
| Binary * | at (size_t index) |
| Get a pointer to the MachO::Binary specified by the index. It returns a nullptr if the binary does not exist at the given index. | |
| const Binary * | at (size_t index) const |
| Binary * | back () |
| const Binary * | back () const |
| Binary * | front () |
| const Binary * | front () const |
| Binary * | operator[] (size_t index) |
| const Binary * | operator[] (size_t index) const |
| std::unique_ptr< Binary > | take (size_t index) |
| Extract a MachO::Binary object. Gives ownership to the caller, and remove it from this FatBinary object. | |
| std::unique_ptr< Binary > | take (Header::CPU_TYPE cpu) |
| Take the underlying MachO::Binary that matches the given architecture If no binary with the architecture can be found, return a nullptr. | |
| void | write (const std::string &filename) |
| Reconstruct the Fat binary object and write it in filename. | |
| std::vector< uint8_t > | raw () |
| Reconstruct the Fat binary object and return his content as bytes. | |
Class which represent a Mach-O (fat) binary This object is also used for representing Mach-O binaries that are NOT FAT.
| using LIEF::MachO::FatBinary::binaries_t = std::vector<std::unique_ptr<Binary>> |
Internal containter used to store Binary objects within a Fat Mach-O.
Iterator that outputs Binary&.
| using LIEF::MachO::FatBinary::it_const_binaries = const_ref_iterator<const binaries_t&, Binary*> |
Iterator that outputs const Binary&.
|
delete |
References FatBinary().
Referenced by FatBinary(), operator<<, and operator=().
|
virtual |
| Binary * LIEF::MachO::FatBinary::at | ( | size_t | index | ) |
Get a pointer to the MachO::Binary specified by the index. It returns a nullptr if the binary does not exist at the given index.
Referenced by operator[](), and operator[]().
| const Binary * LIEF::MachO::FatBinary::at | ( | size_t | index | ) | const |
| Binary * LIEF::MachO::FatBinary::back | ( | ) |
| const Binary * LIEF::MachO::FatBinary::back | ( | ) | const |
|
inline |
|
inline |
|
inline |
Checks whether this object contains MachO::Binary.
|
inline |
|
inline |
| Binary * LIEF::MachO::FatBinary::front | ( | ) |
| const Binary * LIEF::MachO::FatBinary::front | ( | ) | const |
References FatBinary().
| std::unique_ptr< Binary > LIEF::MachO::FatBinary::pop_back | ( | ) |
Get a pointer to the last MachO::Binary object presents in this Fat Binary. It returns a nullptr if no binary are present.
| std::vector< uint8_t > LIEF::MachO::FatBinary::raw | ( | ) |
Reconstruct the Fat binary object and return his content as bytes.
| void LIEF::MachO::FatBinary::release_all_binaries | ( | ) |
|
inline |
Number of MachO::Binary wrapped by this object.
| std::unique_ptr< Binary > LIEF::MachO::FatBinary::take | ( | Header::CPU_TYPE | cpu | ) |
Take the underlying MachO::Binary that matches the given architecture If no binary with the architecture can be found, return a nullptr.
| std::unique_ptr< Binary > LIEF::MachO::FatBinary::take | ( | size_t | index | ) |
Extract a MachO::Binary object. Gives ownership to the caller, and remove it from this FatBinary object.
| void LIEF::MachO::FatBinary::write | ( | const std::string & | filename | ) |
Reconstruct the Fat binary object and write it in filename.
| filename | Path to write the reconstructed binary |