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_H
17#define LIEF_PE_RELOCATION_H
38struct pe_base_relocation_block;
49 using entries_t = std::vector<std::unique_ptr<RelocationEntry>>;
50 using it_entries = ref_iterator<entries_t&, RelocationEntry*>;
51 using it_const_entries = const_ref_iterator<const entries_t&, RelocationEntry*>;
63 Relocation(
const details::pe_base_relocation_block& header);
66 void swap(Relocation& other);
70 return virtual_address_;
82 it_const_entries
entries()
const {
93 virtual_address_ = virtual_address;
97 block_size_ = block_size;
100 RelocationEntry&
add_entry(
const RelocationEntry& entry);
102 void accept(Visitor& visitor)
const override;
106 using relocations_t = std::vector<std::unique_ptr<Relocation>>;
111 uint32_t block_size_ = 0;
112 uint32_t virtual_address_ = 0;
Class that is used to a read stream of data from different sources.
Definition BinaryStream.hpp:33
Class which represents a PE binary This is the main interface to manage and modify a PE executable.
Definition PE/Binary.hpp:56
Class that is used to rebuild a raw PE binary from a PE::Binary object.
Definition PE/Builder.hpp:45
Main interface to parse PE binaries. In particular the static functions: Parser::parse should be used...
Definition PE/Parser.hpp:52
Class which represents an entry of the PE relocation table.
Definition RelocationEntry.hpp:36
Class which represents the Base Relocation Block We usually find this structure in the ....
Definition PE/Relocation.hpp:43
Relocation & operator=(Relocation other)
it_entries entries()
Definition PE/Relocation.hpp:88
Relocation(Relocation &&)
void accept(Visitor &visitor) const override
uint32_t block_size() const
The total number of bytes in the base relocation block.
Definition PE/Relocation.hpp:79
void swap(Relocation &other)
Relocation & operator=(Relocation &&other)
static relocations_t parse(Parser &ctx, BinaryStream &stream)
uint32_t virtual_address() const
The RVA for which the offset of the relocation entries (RelocationEntry) is added.
Definition PE/Relocation.hpp:69
RelocationEntry & add_entry(const RelocationEntry &entry)
Relocation(uint32_t base)
void virtual_address(uint32_t virtual_address)
Definition PE/Relocation.hpp:92
it_const_entries entries() const
Iterator over the RelocationEntry.
Definition PE/Relocation.hpp:84
Relocation(const details::pe_base_relocation_block &header)
Relocation(const Relocation &other)
friend std::ostream & operator<<(std::ostream &os, const Relocation &relocation)
Relocation(uint32_t base, uint32_t block_size)
void block_size(uint32_t block_size)
Definition PE/Relocation.hpp:96
Definition DataDirectory.hpp:37
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42