16#ifndef LIEF_PE_RELOCATION_H
17#define LIEF_PE_RELOCATION_H
22#include "LIEF/Object.hpp"
23#include "LIEF/visibility.h"
24#include "LIEF/iterators.hpp"
32struct pe_base_relocation_block;
42 using entries_t = std::vector<std::unique_ptr<RelocationEntry>>;
49 Relocation(
const details::pe_base_relocation_block& header);
56 return virtual_address_;
69 it_entries entries() {
73 void virtual_address(uint32_t virtual_address) {
74 virtual_address_ = virtual_address;
76 void block_size(uint32_t block_size) {
77 block_size_ = block_size;
80 RelocationEntry& add_entry(
const RelocationEntry& entry);
82 void accept(Visitor& visitor)
const override;
84 LIEF_API
friend std::ostream& operator<<(std::ostream& os,
const Relocation& relocation);
87 uint32_t block_size_ = 0;
88 uint32_t virtual_address_ = 0;
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:47
Class which represents the Base Relocation Block We usually find this structure in the ....
Definition PE/Relocation.hpp:37
uint32_t block_size() const
The total number of bytes in the base relocation block. block_size = sizeof(BaseRelocationBlock) + nb...
Definition PE/Relocation.hpp:61
uint32_t virtual_address() const
The RVA for which the offset of the relocation entries (RelocationEntry) is added.
Definition PE/Relocation.hpp:55
it_const_entries entries() const
Iterator over the RelocationEntry.
Definition PE/Relocation.hpp:66
Iterator which returns reference on container's values.
Definition iterators.hpp:48
LIEF namespace.
Definition Abstract/Binary.hpp:32