LIEF: Library to Instrument Executable Formats Version 0.15.0
|
Class that represents the Mach-O header. More...
#include <Header.hpp>
Public Types | |
using | flags_list_t = std::set<HEADER_FLAGS> |
Public Types inherited from LIEF::Object | |
template<class T > | |
using | output_t = add_pointer_t<decay_t<T>> |
template<class T > | |
using | output_const_t = add_pointer_t<add_const_t<decay_t<T>>> |
Public Member Functions | |
Header (const details::mach_header_64 &header) | |
Header (const details::mach_header &header) | |
Header & | operator= (const Header ©) |
Header (const Header ©) | |
MACHO_TYPES | magic () const |
The Mach-O magic bytes. These bytes determine whether it is a 32 bits Mach-O, a 64 bits Mach-O files etc. | |
CPU_TYPES | cpu_type () const |
The CPU architecture targeted by this binary. | |
uint32_t | cpu_subtype () const |
Return the CPU subtype supported by the Mach-O binary. For ARM architectures, this value could represent the minimum version for which the Mach-O binary has been compiled for. | |
FILE_TYPES | file_type () const |
Return the type of the Mach-O file (executable, object, shared library, ...) | |
flags_list_t | flags_list () const |
Return the HEADER_FLAGS as a std::set. | |
bool | has (HEADER_FLAGS flag) const |
Check if the given HEADER_FLAGS is present in the header's flags. | |
uint32_t | nb_cmds () const |
Number of LoadCommand present in the Mach-O binary. | |
uint32_t | sizeof_cmds () const |
The size of all the LoadCommand. | |
uint32_t | flags () const |
Header flags (cf. HEADER_FLAGS) | |
uint32_t | reserved () const |
According to the official documentation, a reserved value. | |
void | add (HEADER_FLAGS flag) |
OBJECT_TYPES | abstract_object_type () const |
LIEF abstract object type. | |
std::pair< ARCHITECTURES, std::set< MODES > > | abstract_architecture () const |
ENDIANNESS | abstract_endianness () const |
LIEF abstract endiannes. | |
void | magic (MACHO_TYPES magic) |
void | cpu_type (CPU_TYPES cputype) |
void | cpu_subtype (uint32_t cpusubtype) |
void | file_type (FILE_TYPES filetype) |
void | nb_cmds (uint32_t ncmds) |
void | sizeof_cmds (uint32_t sizeofcmds) |
void | flags (uint32_t flags) |
void | remove (HEADER_FLAGS flag) |
void | reserved (uint32_t reserved) |
Header & | operator+= (HEADER_FLAGS c) |
Header & | operator-= (HEADER_FLAGS c) |
void | accept (Visitor &visitor) const override |
Public Member Functions inherited from LIEF::Object | |
Object (const Object &other) | |
Object & | operator= (const Object &other) |
template<class T > | |
output_t< T > | as () |
template<class T > | |
output_const_t< T > | as () const |
virtual bool | operator== (const Object &other) const |
virtual bool | operator!= (const Object &other) const |
Class that represents the Mach-O header.
|
overridevirtual |
Implements LIEF::Object.
uint32_t LIEF::MachO::Header::flags | ( | ) | const |
Header flags (cf. HEADER_FLAGS)