LIEF: Library to Instrument Executable Formats Version 0.17.0
|
Class which represents an entry of the PE relocation table. More...
#include <RelocationEntry.hpp>
Public Types | |
enum class | BASE_TYPES { UNKNOWN = -1 , ABS = 0 , HIGH = 1 , LOW = 2 , HIGHLOW = 3 , HIGHADJ = 4 , MIPS_JMPADDR = 5 , ARM_MOV32A = 5 + 0x101 , ARM_MOV32 = 5 + 0x102 , RISCV_HI20 = 5 + 0x103 , SECTION = 6 , REL = 7 , ARM_MOV32T = 7 + 0x201 , THUMB_MOV32 = 7 + 0x202 , RISCV_LOW12I = 7 + 0x203 , RISCV_LOW12S = 8 , IA64_IMM64 = 9 , MIPS_JMPADDR16 = 9 + 0x300 , DIR64 = 10 , HIGH3ADJ = 11 } |
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>>> |
Public Member Functions | |
RelocationEntry ()=default | |
RelocationEntry (const RelocationEntry &other) | |
RelocationEntry & | operator= (RelocationEntry other) |
RelocationEntry (uint16_t position, BASE_TYPES type) | |
~RelocationEntry () override=default | |
void | swap (RelocationEntry &other) |
uint64_t | address () const override |
The address of the relocation. | |
void | address (uint64_t address) override |
size_t | size () const override |
The size of the relocatable pointer. | |
void | size (size_t size) override |
uint16_t | data () const |
Raw data of the relocation: | |
uint16_t | position () const |
Offset relative to Relocation::virtual_address where the relocation occurs. | |
BASE_TYPES | type () const |
Type of the relocation. | |
void | data (uint16_t data) |
void | position (uint16_t position) |
void | type (BASE_TYPES type) |
void | accept (Visitor &visitor) const override |
Method so that the visitor can visit us. | |
Public Member Functions inherited from LIEF::Relocation | |
Relocation ()=default | |
Relocation (uint64_t address, uint8_t size) | |
Constructor from a relocation's address and size. | |
~Relocation () override=default | |
Relocation & | operator= (const Relocation &)=default |
Relocation (const Relocation &)=default | |
void | swap (Relocation &other) |
virtual bool | operator< (const Relocation &rhs) const |
Comparaison based on the Relocation's address | |
virtual bool | operator<= (const Relocation &rhs) const |
Comparaison based on the Relocation's address | |
virtual bool | operator> (const Relocation &rhs) const |
Comparaison based on the Relocation's address | |
virtual bool | operator>= (const Relocation &rhs) const |
Comparaison based on the Relocation's address | |
Public Member Functions inherited from LIEF::Object | |
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 |
virtual | ~Object () |
Static Public Member Functions | |
static RelocationEntry | from_raw (Header::MACHINE_TYPES arch, uint16_t raw) |
Class which represents an entry of the PE relocation table.
It extends the LIEF::Relocation object to provide an uniform API across the file formats
|
strong |
|
default |
LIEF::PE::RelocationEntry::RelocationEntry | ( | const RelocationEntry & | other | ) |
LIEF::PE::RelocationEntry::RelocationEntry | ( | uint16_t | position, |
BASE_TYPES | type ) |
|
overridedefault |
|
overridevirtual |
Method so that the visitor
can visit us.
Reimplemented from LIEF::Relocation.
|
overridevirtual |
The address of the relocation.
Reimplemented from LIEF::Relocation.
|
overridevirtual |
Reimplemented from LIEF::Relocation.
uint16_t LIEF::PE::RelocationEntry::data | ( | ) | const |
Raw data of the relocation:
void LIEF::PE::RelocationEntry::data | ( | uint16_t | data | ) |
|
inlinestatic |
RelocationEntry & LIEF::PE::RelocationEntry::operator= | ( | RelocationEntry | other | ) |
|
inline |
Offset relative to Relocation::virtual_address where the relocation occurs.
|
inline |
|
overridevirtual |
The size of the relocatable pointer.
Reimplemented from LIEF::Relocation.
|
overridevirtual |
Reimplemented from LIEF::Relocation.
void LIEF::PE::RelocationEntry::swap | ( | RelocationEntry & | other | ) |
|
inline |
Type of the relocation.
|
inline |