LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::Header Class Reference

#include <Header.hpp>

Inheritance diagram for LIEF::Header:
Collaboration diagram for LIEF::Header:

Public Types

enum class  ARCHITECTURES {
  UNKNOWN = 0 , ARM , ARM64 , MIPS ,
  X86 , X86_64 , PPC , SPARC ,
  SYSZ , XCORE , RISCV , LOONGARCH
}
 
enum class  ENDIANNESS { UNKNOWN = 0 , BIG , LITTLE }
 
enum  MODES : uint64_t {
  NONE = 0 , BITS_16 = 1LLU << 0 , BITS_32 = 1LLU << 1 , BITS_64 = 1LLU << 2 ,
  THUMB = 1LLU << 3 , ARM64E = 1LLU << 4
}
 
enum class  OBJECT_TYPES { UNKNOWN = 0 , EXECUTABLE , LIBRARY , OBJECT }
 
- 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 ()=default
 
 Header (const Header &)=default
 
Headeroperator= (const Header &)=default
 
 ~Header () override=default
 
ARCHITECTURES architecture () const
 Target architecture.
 
MODES modes () const
 Optional features for the given architecture.
 
std::vector< MODESmodes_list () const
 MODES as a vector.
 
bool is (MODES m) const
 
OBJECT_TYPES object_type () const
 
uint64_t entrypoint () const
 
ENDIANNESS endianness () const
 
bool is_32 () const
 
bool is_64 () const
 
void accept (Visitor &visitor) const override
 
- Public Member Functions inherited from LIEF::Object
 Object ()
 
 Object (const Object &other)
 
Objectoperator= (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
 
virtual ~Object ()
 

Static Public Member Functions

static Header from (const LIEF::ELF::Binary &elf)
 
static Header from (const LIEF::PE::Binary &pe)
 
static Header from (const LIEF::MachO::Binary &macho)
 

Member Enumeration Documentation

◆ ARCHITECTURES

enum class LIEF::Header::ARCHITECTURES
strong
Enumerator
UNKNOWN 
ARM 
ARM64 
MIPS 
X86 
X86_64 
PPC 
SPARC 
SYSZ 
XCORE 
RISCV 
LOONGARCH 

◆ ENDIANNESS

enum class LIEF::Header::ENDIANNESS
strong
Enumerator
UNKNOWN 
BIG 
LITTLE 

◆ MODES

enum LIEF::Header::MODES : uint64_t
Enumerator
NONE 
BITS_16 
BITS_32 

16-bits architecture

BITS_64 

32-bits architecture

THUMB 

64-bits architecture

ARM64E 

Support ARM Thumb mode.

◆ OBJECT_TYPES

enum class LIEF::Header::OBJECT_TYPES
strong
Enumerator
UNKNOWN 
EXECUTABLE 
LIBRARY 
OBJECT 

Constructor & Destructor Documentation

◆ Header() [1/2]

LIEF::Header::Header ( )
default

◆ Header() [2/2]

LIEF::Header::Header ( const Header & )
default

◆ ~Header()

LIEF::Header::~Header ( )
overridedefault

Member Function Documentation

◆ accept()

void LIEF::Header::accept ( Visitor & visitor) const
overridevirtual

Implements LIEF::Object.

◆ architecture()

ARCHITECTURES LIEF::Header::architecture ( ) const
inline

Target architecture.

◆ endianness()

ENDIANNESS LIEF::Header::endianness ( ) const
inline

◆ entrypoint()

uint64_t LIEF::Header::entrypoint ( ) const
inline

◆ from() [1/3]

static Header LIEF::Header::from ( const LIEF::ELF::Binary & elf)
static

◆ from() [2/3]

static Header LIEF::Header::from ( const LIEF::MachO::Binary & macho)
static

◆ from() [3/3]

static Header LIEF::Header::from ( const LIEF::PE::Binary & pe)
static

◆ is()

bool LIEF::Header::is ( MODES m) const
inline

◆ is_32()

bool LIEF::Header::is_32 ( ) const
inline

◆ is_64()

bool LIEF::Header::is_64 ( ) const
inline

◆ modes()

MODES LIEF::Header::modes ( ) const
inline

Optional features for the given architecture.

◆ modes_list()

std::vector< MODES > LIEF::Header::modes_list ( ) const

MODES as a vector.

◆ object_type()

OBJECT_TYPES LIEF::Header::object_type ( ) const
inline

◆ operator=()

Header & LIEF::Header::operator= ( const Header & )
default

The documentation for this class was generated from the following file: