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

Classes

class  AuxiliarybfAndefSymbol
 
class  AuxiliaryCLRToken
 Auxiliary symbol associated with the CLR_TOKEN storage class. More...
 
class  AuxiliaryFile
 This auxiliary symbol represents a filename (auxiliary format 4) More...
 
class  AuxiliaryFunctionDefinition
 This auxiliary symbols marks the beginning of a function definition. More...
 
class  AuxiliarySectionDefinition
 This auxiliary symbol exposes information about the associated section. More...
 
class  AuxiliarySymbol
 Class that represents an auxiliary symbol. More...
 
class  AuxiliaryWeakExternal
 "Weak externals" are a mechanism for object files that allows flexibility at link time. A module can contain an unresolved external symbol (sym1), but it can also include an auxiliary record that indicates that if sym1 is not present at link time, another external symbol (sym2) is used to resolve references instead. More...
 
class  BigObjHeader
 This class represents the header for a COFF object compiled with /bigobj support (i.e. the number of sections can exceed 65536). More...
 
class  Binary
 Class that represents a COFF Binary. More...
 
class  Header
 Class that represents the COFF header. It is subclassed by LIEF::COFF::RegularHeader and LIEF::COFF::BigObjHeader for normal vs /bigobj files. More...
 
class  Parser
 
class  ParserConfig
 Class used to configure the COFF parser. More...
 
class  RegularHeader
 This class represents the COFF header for non-bigobj. More...
 
class  Relocation
 This class represents a COFF relocation. More...
 
class  Section
 This class represents a COFF section. More...
 
class  String
 This class represents a string located in the COFF string table. More...
 
class  Symbol
 This class represents a COFF symbol. More...
 

Functions

const char * to_string (AuxiliarySectionDefinition::COMDAT_SELECTION e)
 
const char * to_string (AuxiliaryWeakExternal::CHARACTERISTICS e)
 
const char * to_string (Header::KIND kind)
 
const char * to_string (Header::MACHINE_TYPES machine)
 
const char * to_string (Relocation::TYPE e)
 
const char * to_string (Section::CHARACTERISTICS e)
 
const char * to_string (Symbol::STORAGE_CLASS e)
 
const char * to_string (Symbol::BASE_TYPE e)
 
const char * to_string (Symbol::COMPLEX_TYPE e)
 
Header::KIND get_kind (BinaryStream &stream)
 This function determines if the given stream wraps a COFF binary and if so, whether it's a regular or bigobj COFF.
 
bool is_coff (BinaryStream &stream)
 Check if the given stream wraps a COFF file.
 
bool is_coff (const std::string &file)
 Check if the file is a COFF.
 
bool is_coff (const uint8_t *buffer, size_t size)
 Check if the given buffer points to a COFF file.
 
bool is_coff (const std::vector< uint8_t > &buffer)
 Check if the given buffer points to a COFF file.
 
bool is_bigobj (BinaryStream &stream)
 Check if the COFF file wrapped by the given stream is a bigobj
 
bool is_regular (BinaryStream &stream)
 Check if the COFF file wrapped by the given stream is regular (i.e. not a bigobj)
 

Function Documentation

◆ get_kind()

Header::KIND LIEF::COFF::get_kind ( BinaryStream & stream)

This function determines if the given stream wraps a COFF binary and if so, whether it's a regular or bigobj COFF.

Referenced by is_bigobj(), is_coff(), and is_regular().

◆ is_bigobj()

bool LIEF::COFF::is_bigobj ( BinaryStream & stream)
inline

Check if the COFF file wrapped by the given stream is a bigobj

References LIEF::COFF::Header::BIGOBJ, and get_kind().

◆ is_coff() [1/4]

bool LIEF::COFF::is_coff ( BinaryStream & stream)
inline

Check if the given stream wraps a COFF file.

References get_kind(), and LIEF::COFF::Header::UNKNOWN.

Referenced by is_coff(), is_coff(), and is_coff().

◆ is_coff() [2/4]

bool LIEF::COFF::is_coff ( const std::string & file)
inline

Check if the file is a COFF.

References LIEF::FileStream::from_file(), and is_coff().

◆ is_coff() [3/4]

bool LIEF::COFF::is_coff ( const std::vector< uint8_t > & buffer)
inline

Check if the given buffer points to a COFF file.

References is_coff().

◆ is_coff() [4/4]

bool LIEF::COFF::is_coff ( const uint8_t * buffer,
size_t size )
inline

Check if the given buffer points to a COFF file.

References is_coff().

◆ is_regular()

bool LIEF::COFF::is_regular ( BinaryStream & stream)
inline

Check if the COFF file wrapped by the given stream is regular (i.e. not a bigobj)

References get_kind(), and LIEF::COFF::Header::REGULAR.

◆ to_string() [1/9]

const char * LIEF::COFF::to_string ( AuxiliarySectionDefinition::COMDAT_SELECTION e)

◆ to_string() [2/9]

const char * LIEF::COFF::to_string ( AuxiliaryWeakExternal::CHARACTERISTICS e)

◆ to_string() [3/9]

const char * LIEF::COFF::to_string ( Header::KIND kind)
inline

◆ to_string() [4/9]

const char * LIEF::COFF::to_string ( Header::MACHINE_TYPES machine)
inline

References LIEF::PE::to_string().

◆ to_string() [5/9]

const char * LIEF::COFF::to_string ( Relocation::TYPE e)

◆ to_string() [6/9]

const char * LIEF::COFF::to_string ( Section::CHARACTERISTICS e)
inline

References LIEF::PE::to_string().

◆ to_string() [7/9]

const char * LIEF::COFF::to_string ( Symbol::BASE_TYPE e)

◆ to_string() [8/9]

const char * LIEF::COFF::to_string ( Symbol::COMPLEX_TYPE e)

◆ to_string() [9/9]

const char * LIEF::COFF::to_string ( Symbol::STORAGE_CLASS e)