ROSE 0.11.145.147
|
Relocation record.
A relocation record describes how the new encoded instructions need to have their encodings adjusted when they're placed at some specific memory address. This is necessary because the instructions are encoded by the user before an address is chosen by the CodeInserter.
Each relocation entry applies to a specific index in the vector of bytes of the encoded instructions. This is called the relocation offset
. The type
of the relocation indicates which predefined function is used to calculate the value that is to be written to that output offset, and value
is an optional argument that gets passed to that function.
Definition at line 116 of file CodeInserter.h.
#include <Rose/BinaryAnalysis/CodeInserter.h>
Public Member Functions | |
Relocation (size_t offset, RelocType type, rose_addr_t value) | |
Constructor. | |
Public Attributes | |
size_t | offset |
Location of relocation in replacement code. | |
RelocType | type |
Relocation algorithm. | |
rose_addr_t | value |
Argument for relocation algorithm. | |
|
inline |
Constructor.
Construct a relocation that will change the value at the specified offset
in the replacement code. The size of the area overwritten as well as the algorithm for computing the new bytes are determined by the relocation type
. The value
is one of the inputs to the relocation algorithm (the other is the virtual address of the byte at the specified offset
in the replacement.
Definition at line 127 of file CodeInserter.h.
size_t Rose::BinaryAnalysis::CodeInserter::Relocation::offset |
Location of relocation in replacement code.
Definition at line 117 of file CodeInserter.h.
RelocType Rose::BinaryAnalysis::CodeInserter::Relocation::type |
Relocation algorithm.
Definition at line 118 of file CodeInserter.h.
rose_addr_t Rose::BinaryAnalysis::CodeInserter::Relocation::value |
Argument for relocation algorithm.
Definition at line 119 of file CodeInserter.h.