retdec
|
#include <elf_notes.h>
Public Member Functions | |
Constructors and destructor | |
ElfNoteSecSeg (const SecSeg *assocSecSeg) | |
Setters | |
void | setMalformed (const std::string &message="corrupted note") |
Add notes | |
void | addNote (ElfNoteEntry &¬e) |
void | addNote (const ElfNoteEntry ¬e) |
Getters | |
std::vector< ElfNoteEntry > | getNotes () const |
std::string | getErrorMessage () const |
std::size_t | getSecSegOffset () const |
std::size_t | getSecSegLength () const |
std::string | getSectionName () const |
Query methods | |
bool | isNamedSection () const |
bool | isMalformed () const |
bool | isEmpty () const |
Private Attributes | |
const SecSeg * | secSeg |
associated section or segment More... | |
std::vector< ElfNoteEntry > | notes |
notes in segment or section More... | |
bool | malformed = false |
set to true if notes are malformed More... | |
std::string | error |
possible error message More... | |
Class describing one ELF note section or segment
retdec::fileformat::ElfNoteSecSeg::ElfNoteSecSeg | ( | const SecSeg * | assocSecSeg | ) |
Constructor
assocSecSeg | pointer to associated section or segment |
void retdec::fileformat::ElfNoteSecSeg::addNote | ( | const ElfNoteEntry & | note | ) |
Add one note entry (copy)
note | note entry |
void retdec::fileformat::ElfNoteSecSeg::addNote | ( | ElfNoteEntry && | note | ) |
Add one note entry (move)
note | note entry |
std::string retdec::fileformat::ElfNoteSecSeg::getErrorMessage | ( | ) | const |
Get error message for malformed binaries
std::vector< ElfNoteEntry > retdec::fileformat::ElfNoteSecSeg::getNotes | ( | ) | const |
Get notes for segment or section
std::size_t retdec::fileformat::ElfNoteSecSeg::getSecSegLength | ( | ) | const |
Get length of section or segment in file
std::size_t retdec::fileformat::ElfNoteSecSeg::getSecSegOffset | ( | ) | const |
Get file offset of section or segment
std::string retdec::fileformat::ElfNoteSecSeg::getSectionName | ( | ) | const |
Get name of section (only sections have name)
bool retdec::fileformat::ElfNoteSecSeg::isEmpty | ( | ) | const |
Check if object contains any notes
true
if object contains any notes, false
otherwise bool retdec::fileformat::ElfNoteSecSeg::isMalformed | ( | ) | const |
Check if notes are malformed
true
if notes are malformed, false
otherwise bool retdec::fileformat::ElfNoteSecSeg::isNamedSection | ( | ) | const |
Check if notes belong to named section
true
if notes belong to named section, false
otherwise void retdec::fileformat::ElfNoteSecSeg::setMalformed | ( | const std::string & | message = "corrupted note" | ) |
Set malformed bit for notes
message | optional error message |
|
private |
possible error message
|
private |
set to true
if notes are malformed
|
private |
notes in segment or section
|
private |
associated section or segment