Theodosius  v3.0
Jit linker, mapper, obfuscator, and mutator
Public Member Functions | List of all members
theo::recomp::reloc_t Class Reference

meta data about a relocation for a symbol More...

#include <reloc.hpp>

Public Member Functions

 reloc_t (std::uint32_t offset, std::size_t hash, const std::string &&sym_name)
 explicit constructor for this class. More...
 
std::size_t hash ()
 returns the hash of the relocation symbol. More...
 
std::string name ()
 returns the name of the relocation symbol. More...
 
std::uint32_t offset ()
 returns the offset into the symbol to which the relocation will be applied. the offset is in bytes. zero based. More...
 
void offset (std::uint32_t offset)
 sets the offset to which the relocation gets applied too. More...
 
void add_transform (std::pair< obf::transform::transform_t *, std::uint32_t > entry)
 adds a transformation to be applied to the relocation prior to writing it into the symbol. More...
 
std::vector< std::pair< obf::transform::transform_t *, std::uint32_t > > & get_transforms ()
 gets the vector of transformation. More...
 

Detailed Description

meta data about a relocation for a symbol

Definition at line 41 of file reloc.hpp.

Constructor & Destructor Documentation

◆ reloc_t()

theo::recomp::reloc_t::reloc_t ( std::uint32_t  offset,
std::size_t  hash,
const std::string &&  sym_name 
)
inlineexplicit

explicit constructor for this class.

Parameters
offsetoffset into the symbol data where the relocation is at. all relocations are assumed to be linear virtual addresses of the symbol.
hashhash of the symbol to which the relocation is of.
sym_namethe name of the symbol to which the relocation is of.

Definition at line 52 of file reloc.hpp.

Member Function Documentation

◆ add_transform()

void theo::recomp::reloc_t::add_transform ( std::pair< obf::transform::transform_t *, std::uint32_t >  entry)
inline

adds a transformation to be applied to the relocation prior to writing it into the symbol.

Parameters
entrya pair containing a lambda function that when executed transforms a relocation. the second value in the pair is a random value which is passed to the lambda.

Definition at line 91 of file reloc.hpp.

Here is the caller graph for this function:

◆ get_transforms()

std::vector<std::pair<obf::transform::transform_t*, std::uint32_t> >& theo::recomp::reloc_t::get_transforms ( )
inline

gets the vector of transformation.

Returns
returns the vector of transformations.

Definition at line 101 of file reloc.hpp.

Here is the caller graph for this function:

◆ hash()

std::size_t theo::recomp::reloc_t::hash ( )
inline

returns the hash of the relocation symbol.

Returns
hash of the relocation symbol

Definition at line 61 of file reloc.hpp.

◆ name()

std::string theo::recomp::reloc_t::name ( )
inline

returns the name of the relocation symbol.

Returns
returns the name of the relocation symbol.

Definition at line 67 of file reloc.hpp.

◆ offset() [1/2]

std::uint32_t theo::recomp::reloc_t::offset ( )
inline

returns the offset into the symbol to which the relocation will be applied. the offset is in bytes. zero based.

Returns
returns the offset into the symbol to which the relocation will be applied. the offset is in bytes. zero based.

Definition at line 75 of file reloc.hpp.

◆ offset() [2/2]

void theo::recomp::reloc_t::offset ( std::uint32_t  offset)
inline

sets the offset to which the relocation gets applied too.

Parameters
offsetoffset to which the relocation gets applied too.

Definition at line 82 of file reloc.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

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