LIEF: Library to Instrument Executable Formats Version 0.16.0
Loading...
Searching...
No Matches
LIEF::PE::Relocation Class Reference

Class which represents the Base Relocation Block We usually find this structure in the .reloc section. More...

#include <Relocation.hpp>

Inheritance diagram for LIEF::PE::Relocation:
Collaboration diagram for LIEF::PE::Relocation:

Public Types

using entries_t = std::vector<std::unique_ptr<RelocationEntry>>
 
using it_entries = ref_iterator<entries_t&, RelocationEntry*>
 
using it_const_entries = const_ref_iterator<const entries_t&, RelocationEntry*>
 
- 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

 Relocation ()=default
 
 Relocation (const Relocation &other)
 
Relocationoperator= (Relocation other)
 
 Relocation (const details::pe_base_relocation_block &header)
 
 ~Relocation () override=default
 
void swap (Relocation &other)
 
uint32_t virtual_address () const
 The RVA for which the offset of the relocation entries (RelocationEntry) is added.
 
uint32_t block_size () const
 The total number of bytes in the base relocation block. block_size = sizeof(BaseRelocationBlock) + nb_of_relocs * sizeof(uint16_t = RelocationEntry)
 
it_const_entries entries () const
 Iterator over the RelocationEntry.
 
it_entries entries ()
 
void virtual_address (uint32_t virtual_address)
 
void block_size (uint32_t block_size)
 
RelocationEntryadd_entry (const RelocationEntry &entry)
 
void accept (Visitor &visitor) const override
 
- Public Member Functions inherited from LIEF::Object
 Object ()
 
 Object (const Object &other)
 
Objectoperator= (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 ()
 

Detailed Description

Class which represents the Base Relocation Block We usually find this structure in the .reloc section.

Member Typedef Documentation

◆ entries_t

using LIEF::PE::Relocation::entries_t = std::vector<std::unique_ptr<RelocationEntry>>

◆ it_const_entries

◆ it_entries

Constructor & Destructor Documentation

◆ Relocation() [1/3]

LIEF::PE::Relocation::Relocation ( )
default

◆ Relocation() [2/3]

LIEF::PE::Relocation::Relocation ( const Relocation & other)

◆ Relocation() [3/3]

LIEF::PE::Relocation::Relocation ( const details::pe_base_relocation_block & header)

◆ ~Relocation()

LIEF::PE::Relocation::~Relocation ( )
overridedefault

Member Function Documentation

◆ accept()

void LIEF::PE::Relocation::accept ( Visitor & visitor) const
overridevirtual

Implements LIEF::Object.

◆ add_entry()

RelocationEntry & LIEF::PE::Relocation::add_entry ( const RelocationEntry & entry)

◆ block_size() [1/2]

uint32_t LIEF::PE::Relocation::block_size ( ) const
inline

The total number of bytes in the base relocation block. block_size = sizeof(BaseRelocationBlock) + nb_of_relocs * sizeof(uint16_t = RelocationEntry)

◆ block_size() [2/2]

void LIEF::PE::Relocation::block_size ( uint32_t block_size)
inline

◆ entries() [1/2]

it_entries LIEF::PE::Relocation::entries ( )
inline

◆ entries() [2/2]

it_const_entries LIEF::PE::Relocation::entries ( ) const
inline

Iterator over the RelocationEntry.

◆ operator=()

Relocation & LIEF::PE::Relocation::operator= ( Relocation other)

◆ swap()

void LIEF::PE::Relocation::swap ( Relocation & other)

◆ virtual_address() [1/2]

uint32_t LIEF::PE::Relocation::virtual_address ( ) const
inline

The RVA for which the offset of the relocation entries (RelocationEntry) is added.

◆ virtual_address() [2/2]

void LIEF::PE::Relocation::virtual_address ( uint32_t virtual_address)
inline

The documentation for this class was generated from the following file: