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_LOAD_CONFIGURATION_DYNAMIC_RELOCATION_H
17#define LIEF_PE_LOAD_CONFIGURATION_DYNAMIC_RELOCATION_H
34 public:
enum IMAGE_DYNAMIC_RELOCATION { RELOCATION_GUARD_RF_PROLOGUE = 1,
39 RELOCATION_GUARD_RF_EPILOGUE = 2,
42 RELOCATION_GUARD_IMPORT_CONTROL_TRANSFER = 3,
45 RELOCATION_GUARD_INDIR_CONTROL_TRANSFER = 4,
48 RELOCATION_GUARD_SWITCHTABLE_BRANCH = 5,
51 RELOCATION_ARM64X = 6,
54 RELOCATION_FUNCTION_OVERRIDE = 7,
57 RELOCATION_ARM64_KERNEL_IMPORT_CALL_TRANSFER = 8,
68 DynamicRelocation&
operator=(
const DynamicRelocation&);
73 virtual std::unique_ptr<DynamicRelocation>
clone()
const = 0;
96 DynamicRelocation&
symbol(uint64_t value) {
101 DynamicRelocation&
fixups(std::unique_ptr<DynamicFixup> F);
107 static_assert(std::is_base_of<DynamicRelocation, T>::value,
108 "Require DynamicRelocation inheritance");
109 if (T::classof(
this)) {
110 return static_cast<T*
>(
this);
117 return const_cast<DynamicRelocation*
>(
this)->as<T>();
121 std::ostream&
operator<<(std::ostream& os,
const DynamicRelocation& reloc)
130 uint32_t version_ = 0;
131 uint64_t symbol_ = 0;
132 std::unique_ptr<DynamicFixup> fixups_;
This is the base class for any fixups located in DynamicRelocation.
Definition DynamicFixup.hpp:34
This is the base class for any IMAGE_DYNAMIC_RELOCATION32, IMAGE_DYNAMIC_RELOCATION32_V2,...
Definition DynamicRelocationBase.hpp:33
DynamicRelocation & operator=(DynamicRelocation &&)
uint32_t version() const
Version of the structure.
Definition DynamicRelocationBase.hpp:76
friend std::ostream & operator<<(std::ostream &os, const DynamicRelocation &reloc)
Definition DynamicRelocationBase.hpp:121
DynamicRelocation & fixups(std::unique_ptr< DynamicFixup > F)
DynamicRelocation()=delete
DynamicRelocation & symbol(uint64_t value)
Definition DynamicRelocationBase.hpp:96
uint64_t symbol() const
Symbol address. Some values have a special meaning (c.f. IMAGE_DYNAMIC_RELOCATION) and define how fix...
Definition DynamicRelocationBase.hpp:82
virtual std::unique_ptr< DynamicRelocation > clone() const =0
DynamicRelocation(const DynamicRelocation &)
IMAGE_DYNAMIC_RELOCATION
Special symbol values as defined in link.exe - GetDVRTSpecialSymbolName
Definition DynamicRelocationBase.hpp:36
T * as()
Definition DynamicRelocationBase.hpp:106
DynamicFixup * fixups()
Return fixups information, where the interpretation may depend on the symbol's value.
Definition DynamicRelocationBase.hpp:92
DynamicRelocation(uint32_t version)
DynamicRelocation & operator=(const DynamicRelocation &)
virtual ~DynamicRelocation()
virtual std::string to_string() const =0
DynamicRelocation(DynamicRelocation &&)
const T * as() const
Definition DynamicRelocationBase.hpp:116
const DynamicFixup * fixups() const
Definition DynamicRelocationBase.hpp:86
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
@ T
Definition AcceleratorCodes.hpp:97
const char * to_string(AuxiliaryWeakExternal::CHARACTERISTICS e)
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41