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 | (1 << 8) , ARM_MOV32 = 5 | (1 << 9) , RISCV_HI20 = 5 | (1 << 10) , SECTION = 6 , THUMB_MOV32 = 7 | (1 << 11) , RISCV_LOW12I = 7 | (1 << 12) , RISCV_LOW12S = 8 | (1 << 13) , LOONARCH_MARK_LA = 8 | (1 << 14) , MIPS_JMPADDR16 = 9 , DIR64 = 10 , HIGH3ADJ = 11 } |
Relocation type as described in https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#base-relocation-types. More... | |
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 (RelocationEntry &&other)=default | |
RelocationEntry & | operator= (RelocationEntry &&other)=default |
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 | 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) |
Object (Object &&other) noexcept=default | |
Object & | operator= (Object &&other) noexcept=default |
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 uint16_t | get_position (uint16_t data) |
static uint16_t | get_type (uint16_t data) |
static BASE_TYPES | type_from_data (Header::MACHINE_TYPES arch, uint16_t data) |
Static Public Attributes | |
static constexpr auto | MAX_ADDR = 1 << 12 |
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 |
Relocation type as described in https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#base-relocation-types.
|
default |
Referenced by operator<<, operator=(), operator=(), RelocationEntry(), RelocationEntry(), and swap().
|
inline |
References PE::Relocation, and RelocationEntry().
|
default |
References RelocationEntry().
|
inline |
References MAX_ADDR, position(), and type().
|
overridedefault |
|
overridevirtual |
Method so that the visitor can visit us.
Reimplemented from LIEF::Relocation.
|
overridevirtual |
|
overridevirtual |
Reimplemented from LIEF::Relocation.
References address().
|
inline |
Raw data of the relocation:
Referenced by get_position(), get_type(), and type_from_data().
|
inlinestatic |
References data().
|
inlinestatic |
References data().
|
default |
References RelocationEntry().
|
inline |
References RelocationEntry(), and swap().
|
inline |
Offset relative to Relocation::virtual_address where the relocation occurs.
Referenced by position(), and RelocationEntry().
|
inline |
References MAX_ADDR, and position().
|
overridevirtual |
|
overridevirtual |
Reimplemented from LIEF::Relocation.
References size().
|
inline |
References RelocationEntry(), and LIEF::Relocation::swap().
Referenced by operator=().
|
inline |
Type of the relocation.
Referenced by RelocationEntry(), and type().
|
inline |
References type().
|
static |
References data().
|
staticconstexpr |
Referenced by position(), and RelocationEntry().