Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
ElfReader Class Reference

#include <elfreader.h>

+ Collaboration diagram for ElfReader:

Public Types

enum  Result { Ok , NotElf , Corrupt }
 

Public Member Functions

 ElfReader (const QString &binary)
 
ElfData readHeaders ()
 
QByteArray readSection (const QByteArray &sectionName)
 
QString errorString () const
 
QByteArray readCoreName (bool *isCore)
 
QList< QByteArraydependencies ()
 

Friends

class ElfMapper
 

Detailed Description

Definition at line 128 of file elfreader.h.

Member Enumeration Documentation

◆ Result

Enumerator
Ok 
NotElf 
Corrupt 

Definition at line 132 of file elfreader.h.

Constructor & Destructor Documentation

◆ ElfReader()

ElfReader::ElfReader ( const QString binary)
explicit

Definition at line 109 of file elfreader.cpp.

Member Function Documentation

◆ dependencies()

QList< QByteArray > ElfReader::dependencies ( )

Definition at line 366 of file elfreader.cpp.

References DT_NEEDED, DT_NULL, Elf_ELFCLASS64, ElfData::elfclass, getWord(), mapper, QByteArrayLiteral, QStringLiteral, readHeaders(), ElfData::sectionHeaders, QList< T >::size(), and tag.

Referenced by readElfExecutable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ errorString()

QString ElfReader::errorString ( ) const
inline

Definition at line 136 of file elfreader.h.

Referenced by readElfExecutable().

+ Here is the caller graph for this function:

◆ readCoreName()

QByteArray ElfReader::readCoreName ( bool *  isCore)

Definition at line 306 of file elfreader.cpp.

References QList< T >::at(), cutout(), Elf_ET_CORE, Elf_PT_NOTE, Elf_SHT_NOTE, ElfData::elftype, header(), i, mapper, ElfData::programHeaders, ElfData::sectionHeaders, QList< T >::size(), ElfSectionHeader::type, and ElfProgramHeader::type.

+ Here is the call graph for this function:

◆ readHeaders()

ElfData ElfReader::readHeaders ( )

Definition at line 114 of file elfreader.cpp.

Referenced by dependencies(), and readElfExecutable().

+ Here is the caller graph for this function:

◆ readSection()

QByteArray ElfReader::readSection ( const QByteArray sectionName)

Definition at line 282 of file elfreader.cpp.

References QList< T >::at(), i, ElfData::indexOf(), mapper, ElfSectionHeader::offset, ElfData::sectionHeaders, and ElfSectionHeader::size.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ ElfMapper

friend class ElfMapper
friend

Definition at line 141 of file elfreader.h.


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