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

This class interfaces the different GNU_PROPERTY_X86_FEATURE_* properties which includes: More...

#include <X86Feature.hpp>

Inheritance diagram for LIEF::ELF::X86Features:
Collaboration diagram for LIEF::ELF::X86Features:

Public Types

enum class  FLAG { NONE = 0 , USED , NEEDED }
 Flag according to the _AND, _USED or _NEEDED suffixes. More...
 
enum class  FEATURE {
  UNKNOWN = 0 , IBT , SHSTK , LAM_U48 ,
  LAM_U57 , X86 , X87 , MMX ,
  XMM , YMM , ZMM , FXSR ,
  XSAVE , XSAVEOPT , XSAVEC , TMM ,
  MASK
}
 Features provided by these different properties. More...
 
using features_t = std::vector<std::pair<FLAG, FEATURE>>
 List of the features as a pair of FLAG, FEATURE.
 
- Public Types inherited from LIEF::ELF::NoteGnuProperty::Property
enum class  TYPE {
  UNKNOWN = 0 , GENERIC , AARCH64_FEATURES , AARCH64_PAUTH ,
  STACK_SIZE , NO_COPY_ON_PROTECTED , X86_ISA , X86_FEATURE ,
  NEEDED
}
 LIEF's mirror types of the original GNU_PROPERTY_ values. More...
 

Public Member Functions

const features_tfeatures () const
 List of the features.
 
void dump (std::ostream &os) const override
 
 ~X86Features () override=default
 
- Public Member Functions inherited from LIEF::ELF::NoteGnuProperty::Property
TYPE type () const
 Return the LIEF's mirror type of the note.
 
virtual ~Property ()=default
 

Static Public Member Functions

static bool classof (const NoteGnuProperty::Property *prop)
 
static std::unique_ptr< X86Featurescreate (uint32_t type, BinaryStream &stream)
 

Detailed Description

This class interfaces the different GNU_PROPERTY_X86_FEATURE_* properties which includes:

  • GNU_PROPERTY_X86_FEATURE_1_AND
  • GNU_PROPERTY_X86_FEATURE_2_USED
  • GNU_PROPERTY_X86_FEATURE_2_NEEDED

Member Typedef Documentation

◆ features_t

using LIEF::ELF::X86Features::features_t = std::vector<std::pair<FLAG, FEATURE>>

List of the features as a pair of FLAG, FEATURE.

For instance, if the raw property is GNU_PROPERTY_X86_FEATURE_2_USED with a bitmask set to GNU_PROPERTY_X86_FEATURE_2_XSAVE, it generates the pair: FLAG::USED, FEATURE::XSAVE

Member Enumeration Documentation

◆ FEATURE

Features provided by these different properties.

Enumerator
UNKNOWN 
IBT 
SHSTK 
LAM_U48 
LAM_U57 
X86 
X87 
MMX 
XMM 
YMM 
ZMM 
FXSR 
XSAVE 
XSAVEOPT 
XSAVEC 
TMM 
MASK 

◆ FLAG

enum class LIEF::ELF::X86Features::FLAG
strong

Flag according to the _AND, _USED or _NEEDED suffixes.

Enumerator
NONE 

For the original GNU_PROPERTY_X86_FEATURE_1_AND property.

USED 

For the original GNU_PROPERTY_X86_FEATURE_2_USED property.

NEEDED 

For the original GNU_PROPERTY_X86_FEATURE_2_NEEDED property.

Constructor & Destructor Documentation

◆ ~X86Features()

LIEF::ELF::X86Features::~X86Features ( )
overridedefault

Member Function Documentation

◆ classof()

static bool LIEF::ELF::X86Features::classof ( const NoteGnuProperty::Property * prop)
inlinestatic

◆ create()

static std::unique_ptr< X86Features > LIEF::ELF::X86Features::create ( uint32_t type,
BinaryStream & stream )
static

◆ dump()

void LIEF::ELF::X86Features::dump ( std::ostream & os) const
overridevirtual

◆ features()

const features_t & LIEF::ELF::X86Features::features ( ) const
inline

List of the features.


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