ROSE  0.9.10.91
Public Member Functions | Public Attributes | List of all members
Rose::BinaryAnalysis::CodeInserter::Relocation Struct Reference

Description

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 109 of file BinaryCodeInserter.h.

#include <BinaryCodeInserter.h>

Public Member Functions

 Relocation (size_t offset, RelocType type, rose_addr_t value)
 Constructor. More...
 

Public Attributes

size_t offset
 Location of relocation in replacement code. More...
 
RelocType type
 Relocation algorithm. More...
 
rose_addr_t value
 Argument for relocation algorithm. More...
 

Constructor & Destructor Documentation

Rose::BinaryAnalysis::CodeInserter::Relocation::Relocation ( size_t  offset,
RelocType  type,
rose_addr_t  value 
)
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 120 of file BinaryCodeInserter.h.

Member Data Documentation

size_t Rose::BinaryAnalysis::CodeInserter::Relocation::offset

Location of relocation in replacement code.

Definition at line 110 of file BinaryCodeInserter.h.

RelocType Rose::BinaryAnalysis::CodeInserter::Relocation::type

Relocation algorithm.

Definition at line 111 of file BinaryCodeInserter.h.

rose_addr_t Rose::BinaryAnalysis::CodeInserter::Relocation::value

Argument for relocation algorithm.

Definition at line 112 of file BinaryCodeInserter.h.


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