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

This class represents the COFF header for non-bigobj. More...

#include <RegularHeader.hpp>

Inheritance diagram for LIEF::COFF::RegularHeader:
Collaboration diagram for LIEF::COFF::RegularHeader:

Public Member Functions

 RegularHeader ()
 
RegularHeaderoperator= (const RegularHeader &)=default
 
 RegularHeader (const RegularHeader &)=default
 
RegularHeaderoperator= (RegularHeader &&)=default
 
 RegularHeader (RegularHeader &&)=default
 
std::unique_ptr< Headerclone () const override
 
uint16_t sizeof_optionalheader () const
 The size of the optional header that follows this header (should be 0)
 
uint16_t characteristics () const
 Characteristics.
 
void sizeof_optionalheader (uint16_t value)
 
void characteristics (uint16_t value)
 
 ~RegularHeader () override=default
 
std::string to_string () const override
 
- Public Member Functions inherited from LIEF::COFF::Header
 Header ()=default
 
 Header (KIND kind)
 
Headeroperator= (const Header &)=default
 
 Header (const Header &)=default
 
Headeroperator= (Header &&)=default
 
 Header (Header &&)=default
 
KIND kind () const
 The type of this header: whether it is regular or using the /bigobj format.
 
MACHINE_TYPES machine () const
 The machine type targeted by this COFF.
 
uint32_t nb_sections () const
 The number of sections.
 
uint32_t pointerto_symbol_table () const
 Offset of the symbols table.
 
uint32_t nb_symbols () const
 Number of symbols (including auxiliary symbols)
 
uint32_t timedatestamp () const
 Timestamp when the COFF has been generated.
 
void machine (MACHINE_TYPES machine)
 
void nb_sections (uint32_t value)
 
void pointerto_symbol_table (uint32_t value)
 
void nb_symbols (uint32_t value)
 
void timedatestamp (uint32_t value)
 
template<class T >
const T * as () const
 
virtual ~Header ()=default
 

Static Public Member Functions

static std::unique_ptr< RegularHeadercreate (BinaryStream &stream)
 Create a RegularHeader from the given stream.
 
static bool classof (const Header *header)
 
- Static Public Member Functions inherited from LIEF::COFF::Header
static std::unique_ptr< Headercreate (BinaryStream &stream)
 Create a header from the given stream.
 
static std::unique_ptr< Headercreate (BinaryStream &stream, KIND kind)
 

Additional Inherited Members

- Public Types inherited from LIEF::COFF::Header
enum class  KIND { UNKNOWN = 0 , REGULAR , BIGOBJ }
 
using MACHINE_TYPES = LIEF::PE::Header::MACHINE_TYPES
 The different architectures (mirrored from PE)
 

Detailed Description

This class represents the COFF header for non-bigobj.

Constructor & Destructor Documentation

◆ RegularHeader() [1/3]

LIEF::COFF::RegularHeader::RegularHeader ( )
inline

◆ RegularHeader() [2/3]

LIEF::COFF::RegularHeader::RegularHeader ( const RegularHeader & )
default

◆ RegularHeader() [3/3]

LIEF::COFF::RegularHeader::RegularHeader ( RegularHeader && )
default

◆ ~RegularHeader()

LIEF::COFF::RegularHeader::~RegularHeader ( )
overridedefault

Member Function Documentation

◆ characteristics() [1/2]

uint16_t LIEF::COFF::RegularHeader::characteristics ( ) const
inline

Characteristics.

◆ characteristics() [2/2]

void LIEF::COFF::RegularHeader::characteristics ( uint16_t value)
inline

◆ classof()

static bool LIEF::COFF::RegularHeader::classof ( const Header * header)
inlinestatic

◆ clone()

std::unique_ptr< Header > LIEF::COFF::RegularHeader::clone ( ) const
inlineoverridevirtual

Implements LIEF::COFF::Header.

◆ create()

static std::unique_ptr< RegularHeader > LIEF::COFF::RegularHeader::create ( BinaryStream & stream)
static

Create a RegularHeader from the given stream.

◆ operator=() [1/2]

RegularHeader & LIEF::COFF::RegularHeader::operator= ( const RegularHeader & )
default

◆ operator=() [2/2]

RegularHeader & LIEF::COFF::RegularHeader::operator= ( RegularHeader && )
default

◆ sizeof_optionalheader() [1/2]

uint16_t LIEF::COFF::RegularHeader::sizeof_optionalheader ( ) const
inline

The size of the optional header that follows this header (should be 0)

◆ sizeof_optionalheader() [2/2]

void LIEF::COFF::RegularHeader::sizeof_optionalheader ( uint16_t value)
inline

◆ to_string()

std::string LIEF::COFF::RegularHeader::to_string ( ) const
overridevirtual

Reimplemented from LIEF::COFF::Header.


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