retdec
Public Member Functions | Private Attributes | List of all members
retdec::fileinfo::ElfDetector Class Reference

#include <elf_detector.h>

Inheritance diagram for retdec::fileinfo::ElfDetector:
Inheritance graph
[legend]
Collaboration diagram for retdec::fileinfo::ElfDetector:
Collaboration graph
[legend]

Public Member Functions

 ElfDetector (std::string pathToInputFile, FileInformation &finfo, retdec::cpdetect::DetectParams &searchPar, retdec::fileformat::LoadFlags loadFlags)
 
- Public Member Functions inherited from retdec::fileinfo::FileDetector
 FileDetector (const std::string &pathToInputFile, FileInformation &finfo, retdec::cpdetect::DetectParams &searchPar, retdec::fileformat::LoadFlags loadFlags)
 
virtual ~FileDetector ()=default
 
void setConfigFile (retdec::config::Config &config)
 
void getAllInformation ()
 
const retdec::fileformat::FileFormatgetFileParser () const
 

Protected Member Functions

Detection methods
virtual void detectFileClass () override
 
virtual void detectArchitecture () override
 
virtual void detectFileType () override
 
virtual void getAdditionalInfo () override
 
virtual retdec::cpdetect::CompilerDetectorcreateCompilerDetector () const override
 
Pure virtual detection methods

Private Member Functions

Auxiliary detection methods
void getFileVersion ()
 
void getFileHeaderInfo ()
 
void getOsAbiInfoNote ()
 
void getOsAbiInfo ()
 
void getFlags ()
 
void getSegments ()
 
void getSymbolTable ()
 
void getRelocationTable (const ELFIO::section *sec)
 
void getSections ()
 
void getDynamicSectionsSegments ()
 
void getNotes ()
 
void getCoreInfo ()
 

Private Attributes

std::shared_ptr< ElfWrapperelfParser
 file parser More...
 

Additional Inherited Members

- Protected Attributes inherited from retdec::fileinfo::FileDetector
FileInformationfileInfo
 information about file More...
 
retdec::cpdetect::DetectParamscpParams
 parameters for detection of used compiler More...
 
retdec::config::ConfigfileConfig
 configuration of input file More...
 
std::shared_ptr< retdec::fileformat::FileFormatfileParser
 parser of input file More...
 
retdec::fileformat::LoadFlags loadFlags
 load flags for configurable running More...
 
bool loaded
 internal state of instance More...
 

Detailed Description

ElfDetector - find info about ELF binary file

Constructor & Destructor Documentation

◆ ElfDetector()

retdec::fileinfo::ElfDetector::ElfDetector ( std::string  pathToInputFile,
FileInformation finfo,
retdec::cpdetect::DetectParams searchPar,
retdec::fileformat::LoadFlags  loadFlags 
)

Constructor

Parameters
pathToInputFilePath to input file
finfoInstance of class for storing information about file
searchParParameters for detection of used compiler (or packer)
loadFlagsLoad flags

Member Function Documentation

◆ createCompilerDetector()

retdec::cpdetect::CompilerDetector * retdec::fileinfo::ElfDetector::createCompilerDetector ( ) const
overrideprotectedvirtual

Pointer to detector is dynamically allocated and must be released (otherwise there is a memory leak) More detailed description of this method is in the super class

Implements retdec::fileinfo::FileDetector.

◆ detectArchitecture()

void retdec::fileinfo::ElfDetector::detectArchitecture ( )
overrideprotectedvirtual

Detect of target architecture

Implements retdec::fileinfo::FileDetector.

◆ detectFileClass()

void retdec::fileinfo::ElfDetector::detectFileClass ( )
overrideprotectedvirtual

Detect class of file

Implements retdec::fileinfo::FileDetector.

◆ detectFileType()

void retdec::fileinfo::ElfDetector::detectFileType ( )
overrideprotectedvirtual

Detect of type of file

Implements retdec::fileinfo::FileDetector.

◆ getAdditionalInfo()

void retdec::fileinfo::ElfDetector::getAdditionalInfo ( )
overrideprotectedvirtual

Get additional information about file

Implements retdec::fileinfo::FileDetector.

◆ getCoreInfo()

void retdec::fileinfo::ElfDetector::getCoreInfo ( )
private

Get information about core file

◆ getDynamicSectionsSegments()

void retdec::fileinfo::ElfDetector::getDynamicSectionsSegments ( )
private

◆ getFileHeaderInfo()

void retdec::fileinfo::ElfDetector::getFileHeaderInfo ( )
private

Get information about file header

◆ getFileVersion()

void retdec::fileinfo::ElfDetector::getFileVersion ( )
private

Get file version

◆ getFlags()

void retdec::fileinfo::ElfDetector::getFlags ( )
private

Get information about file flags

◆ getNotes()

void retdec::fileinfo::ElfDetector::getNotes ( )
private

Get information about notes

◆ getOsAbiInfo()

void retdec::fileinfo::ElfDetector::getOsAbiInfo ( )
private

Get information about operating system or ABI extension

◆ getOsAbiInfoNote()

void retdec::fileinfo::ElfDetector::getOsAbiInfoNote ( )
private

Get information about operating system or ABI extension from note section

◆ getRelocationTable()

void retdec::fileinfo::ElfDetector::getRelocationTable ( const ELFIO::section *  sec)
private

Get information about relocation table

Parameters
secFile section

◆ getSections()

void retdec::fileinfo::ElfDetector::getSections ( )
private

Get information about sections

◆ getSegments()

void retdec::fileinfo::ElfDetector::getSegments ( )
private

Get information about file segments

◆ getSymbolTable()

void retdec::fileinfo::ElfDetector::getSymbolTable ( )
private

Get information about symbol table

Member Data Documentation

◆ elfParser

std::shared_ptr<ElfWrapper> retdec::fileinfo::ElfDetector::elfParser
private

file parser


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