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

This class represents the header for a COFF object compiled with /bigobj support (i.e. the number of sections can exceed 65536). More...

#include <BigObjHeader.hpp>

Inheritance diagram for LIEF::COFF::BigObjHeader:
Collaboration diagram for LIEF::COFF::BigObjHeader:

Public Member Functions

 BigObjHeader ()
 
BigObjHeaderoperator= (const BigObjHeader &)=default
 
 BigObjHeader (const BigObjHeader &)=default
 
BigObjHeaderoperator= (BigObjHeader &&)=default
 
 BigObjHeader (BigObjHeader &&)=default
 
std::unique_ptr< Headerclone () const override
 
uint16_t version () const
 The version of this header which must be >= 2.
 
span< const uint8_t > uuid () const
 Originally named ClassID, this uuid should match: {D1BAA1C7-BAEE-4ba9-AF20-FAF66AA4DCB8}
 
uint32_t sizeof_data () const
 Size of data that follows the header.
 
uint32_t flags () const
 1 means that it contains metadata
 
uint32_t metadata_size () const
 Size of CLR metadata.
 
uint32_t metadata_offset () const
 Offset of CLR metadata.
 
void version (uint16_t value)
 
void sizeof_data (uint32_t value)
 
void flags (uint32_t value)
 
void metadata_size (uint32_t value)
 
void metadata_offset (uint32_t value)
 
 ~BigObjHeader () 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< BigObjHeadercreate (BinaryStream &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)
 

Static Public Attributes

static constexpr auto UUID_SZ = 16
 

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 header for a COFF object compiled with /bigobj support (i.e. the number of sections can exceed 65536).

The raw definition of the bigobj header is located in winnt.h and named ANON_OBJECT_HEADER_BIGOBJ

Constructor & Destructor Documentation

◆ BigObjHeader() [1/3]

LIEF::COFF::BigObjHeader::BigObjHeader ( )
inline

◆ BigObjHeader() [2/3]

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

◆ BigObjHeader() [3/3]

LIEF::COFF::BigObjHeader::BigObjHeader ( BigObjHeader && )
default

◆ ~BigObjHeader()

LIEF::COFF::BigObjHeader::~BigObjHeader ( )
overridedefault

Member Function Documentation

◆ classof()

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

◆ clone()

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

Implements LIEF::COFF::Header.

◆ create()

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

◆ flags() [1/2]

uint32_t LIEF::COFF::BigObjHeader::flags ( ) const
inline

1 means that it contains metadata

◆ flags() [2/2]

void LIEF::COFF::BigObjHeader::flags ( uint32_t value)
inline

◆ metadata_offset() [1/2]

uint32_t LIEF::COFF::BigObjHeader::metadata_offset ( ) const
inline

Offset of CLR metadata.

◆ metadata_offset() [2/2]

void LIEF::COFF::BigObjHeader::metadata_offset ( uint32_t value)
inline

◆ metadata_size() [1/2]

uint32_t LIEF::COFF::BigObjHeader::metadata_size ( ) const
inline

Size of CLR metadata.

◆ metadata_size() [2/2]

void LIEF::COFF::BigObjHeader::metadata_size ( uint32_t value)
inline

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ sizeof_data() [1/2]

uint32_t LIEF::COFF::BigObjHeader::sizeof_data ( ) const
inline

Size of data that follows the header.

◆ sizeof_data() [2/2]

void LIEF::COFF::BigObjHeader::sizeof_data ( uint32_t value)
inline

◆ to_string()

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

Reimplemented from LIEF::COFF::Header.

◆ uuid()

span< const uint8_t > LIEF::COFF::BigObjHeader::uuid ( ) const
inline

Originally named ClassID, this uuid should match: {D1BAA1C7-BAEE-4ba9-AF20-FAF66AA4DCB8}

◆ version() [1/2]

uint16_t LIEF::COFF::BigObjHeader::version ( ) const
inline

The version of this header which must be >= 2.

◆ version() [2/2]

void LIEF::COFF::BigObjHeader::version ( uint16_t value)
inline

Member Data Documentation

◆ UUID_SZ

auto LIEF::COFF::BigObjHeader::UUID_SZ = 16
staticconstexpr

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