LIEF: Library to Instrument Executable Formats Version 0.15.0
|
Class which represents an abstracted section. More...
#include <Section.hpp>
Public Member Functions | |
Section (std::string name) | |
Section & | operator= (const Section &) |
Section (const Section &) | |
virtual std::string | name () const |
section's name | |
virtual const std::string & | fullname () const |
Return the complete section's name which might trailing (0 ) bytes. | |
virtual span< const uint8_t > | content () const |
section's content | |
virtual void | size (uint64_t size) |
Change the section size. | |
virtual uint64_t | size () const |
section's size (size in the binary, not the virtual size) | |
virtual uint64_t | offset () const |
Offset in the binary. | |
virtual uint64_t | virtual_address () const |
Address where the section should be mapped. | |
virtual void | virtual_address (uint64_t virtual_address) |
virtual void | name (const std::string &name) |
Change the section's name. | |
virtual void | content (const std::vector< uint8_t > &data) |
Change section content. | |
virtual void | offset (uint64_t offset) |
double | entropy () const |
Section's entropy. | |
size_t | search (uint64_t integer, size_t pos, size_t size) const |
size_t | search (const std::vector< uint8_t > &pattern, size_t pos=0) const |
size_t | search (const std::string &pattern, size_t pos=0) const |
size_t | search (uint64_t integer, size_t pos=0) const |
std::vector< size_t > | search_all (uint64_t v, size_t size) const |
std::vector< size_t > | search_all (uint64_t v) const |
std::vector< size_t > | search_all (const std::string &v) const |
void | accept (Visitor &visitor) const override |
Method so that the visitor can visit us. | |
Public Member Functions inherited from LIEF::Object | |
Object (const Object &other) | |
Object & | operator= (const Object &other) |
template<class T > | |
output_t< T > | as () |
template<class T > | |
output_const_t< T > | as () const |
virtual bool | operator== (const Object &other) const |
virtual bool | operator!= (const Object &other) const |
Static Public Attributes | |
static constexpr size_t | npos = -1 |
Additional Inherited Members | |
Public Types inherited from LIEF::Object | |
template<class T > | |
using | output_t = add_pointer_t<decay_t<T>> |
template<class T > | |
using | output_const_t = add_pointer_t<add_const_t<decay_t<T>>> |
Class which represents an abstracted section.
|
overridevirtual |
Method so that the visitor
can visit us.
Implements LIEF::Object.
|
virtual |
section's content
Reimplemented in LIEF::ELF::Section, LIEF::MachO::Section, and LIEF::PE::Section.
|
virtual |
Change section content.
Reimplemented in LIEF::MachO::Section, LIEF::ELF::Section, and LIEF::PE::Section.
|
virtual |
Change the section's name.
Reimplemented in LIEF::PE::Section.
|
virtual |
Offset in the binary.
Reimplemented in LIEF::ELF::Section.
|
virtual |
section's size (size in the binary, not the virtual size)
Reimplemented in LIEF::ELF::Section.
|
virtual |
Change the section size.
Reimplemented in LIEF::ELF::Section.