LIEF: Library to Instrument Executable Formats Version 0.17.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
16#ifndef LIEF_PE_RELOCATION_ENTRY_H
17#define LIEF_PE_RELOCATION_ENTRY_H
40 friend class PE::Relocation;
43 enum class BASE_TYPES {
53 ARM_MOV32A = 5 + 0x101,
54 ARM_MOV32 = 5 + 0x102,
55 RISCV_HI20 = 5 + 0x103,
60 ARM_MOV32T = 7 + 0x201,
61 THUMB_MOV32 = 7 + 0x202,
62 RISCV_LOW12I = 7 + 0x203,
67 MIPS_JMPADDR16 = 9 + 0x300,
72 static RelocationEntry
from_raw(Header::MACHINE_TYPES arch, uint16_t raw) {
73 return RelocationEntry(raw, arch);
83 void swap(RelocationEntry& other);
84 uint64_t
address()
const override;
89 size_t size()
const override;
93 void size(
size_t size)
override;
94 uint16_t
data()
const;
104 BASE_TYPES
type()
const {
113 position_ = position;
120 void accept(Visitor& visitor)
const override;
125 RelocationEntry(uint16_t data, Header::MACHINE_TYPES arch);
127 uint16_t position_ = 0;
128 BASE_TYPES type_ = BASE_TYPES::ABS;
129 Header::MACHINE_TYPES arch_ = Header::MACHINE_TYPES::UNKNOWN;
130 PE::Relocation* relocation_ =
nullptr;
Class which represents an entry of the PE relocation table.
Definition RelocationEntry.hpp:36
void address(uint64_t address) override
RelocationEntry & operator=(RelocationEntry other)
void swap(RelocationEntry &other)
size_t size() const override
The size of the relocatable pointer.
void size(size_t size) override
uint16_t position() const
Offset relative to Relocation::virtual_address where the relocation occurs.
Definition RelocationEntry.hpp:101
RelocationEntry()=default
uint16_t data() const
Raw data of the relocation:
RelocationEntry(uint16_t position, BASE_TYPES type)
uint64_t address() const override
The address of the relocation.
friend std::ostream & operator<<(std::ostream &os, const RelocationEntry &entry)
void accept(Visitor &visitor) const override
Method so that the visitor can visit us.
RelocationEntry(const RelocationEntry &other)
void position(uint16_t position)
Definition RelocationEntry.hpp:112
~RelocationEntry() override=default
BASE_TYPES
Definition RelocationEntry.hpp:43
static RelocationEntry from_raw(Header::MACHINE_TYPES arch, uint16_t raw)
Definition RelocationEntry.hpp:72
void type(BASE_TYPES type)
Definition RelocationEntry.hpp:116
BASE_TYPES type() const
Type of the relocation.
Definition RelocationEntry.hpp:106
Class which represents the Base Relocation Block We usually find this structure in the ....
Definition PE/Relocation.hpp:37
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
const char * to_string(DataDirectory::TYPES e)
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41