LIEF: Library to Instrument Executable Formats Version 0.15.0
|
Class that represents a Mach-O relocation. More...
#include <Relocation.hpp>
Public Member Functions | |
Relocation (uint64_t address, uint8_t type) | |
Relocation & | operator= (const Relocation &other) |
Relocation (const Relocation &other) | |
void | swap (Relocation &other) |
virtual Relocation * | clone () const =0 |
virtual bool | is_pc_relative () const =0 |
Indicates whether the item containing the address to be relocated is part of a CPU instruction that uses PC-relative addressing. | |
virtual uint8_t | type () const |
Type of the relocation according to the Relocation::architecture and/or the Relocation::origin. | |
CPU_TYPES | architecture () const |
Achitecture targeted by this relocation. | |
virtual RELOCATION_ORIGINS | origin () const =0 |
Origin of the relocation. | |
bool | has_symbol () const |
true if the relocation has a symbol associated with | |
Symbol * | symbol () |
Symbol associated with the relocation, if any, otherwise a nullptr. | |
const Symbol * | symbol () const |
bool | has_section () const |
true if the relocation has a section associated with | |
Section * | section () |
Section associated with the relocation, if any, otherwise a nullptr. | |
const Section * | section () const |
bool | has_segment () const |
true if the relocation has a SegmentCommand associated with | |
SegmentCommand * | segment () |
SegmentCommand associated with the relocation, if any, otherwise a nullptr. | |
const SegmentCommand * | segment () const |
virtual void | pc_relative (bool val)=0 |
virtual void | type (uint8_t type) |
void | accept (Visitor &visitor) const override |
virtual std::ostream & | print (std::ostream &os) const |
Public Member Functions inherited from LIEF::Relocation | |
Relocation (uint64_t address, uint8_t size) | |
Constructor from a relocation's address and size. | |
Relocation & | operator= (const Relocation &) |
Relocation (const Relocation &) | |
void | swap (Relocation &other) |
virtual uint64_t | address () const |
Relocation's address. | |
virtual size_t | size () const |
Relocation size in bits | |
virtual void | address (uint64_t address) |
virtual void | size (size_t size) |
void | accept (Visitor &visitor) const override |
Method so that the visitor can visit us. | |
virtual bool | operator< (const Relocation &rhs) const |
Comparaison based on the Relocation's address | |
virtual bool | operator<= (const Relocation &rhs) const |
Comparaison based on the Relocation's address | |
virtual bool | operator> (const Relocation &rhs) const |
Comparaison based on the Relocation's address | |
virtual bool | operator>= (const Relocation &rhs) const |
Comparaison based on the Relocation's address | |
Public Member Functions inherited from LIEF::Object | |
Object (const Object &other) | |
Object & | operator= (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 |
Additional Inherited Members | |
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>>> |
Class that represents a Mach-O relocation.
|
overridevirtual |
Implements LIEF::Object.
|
pure virtual |
Indicates whether the item containing the address to be relocated is part of a CPU instruction that uses PC-relative addressing.
For addresses contained in PC-relative instructions, the CPU adds the address of the instruction to the address contained in the instruction.
Implemented in LIEF::MachO::RelocationDyld, LIEF::MachO::RelocationFixup, and LIEF::MachO::RelocationObject.
|
pure virtual |
Origin of the relocation.
Implemented in LIEF::MachO::RelocationDyld, LIEF::MachO::RelocationFixup, and LIEF::MachO::RelocationObject.
|
pure virtual |
Implemented in LIEF::MachO::RelocationFixup.
|
virtual |
Type of the relocation according to the Relocation::architecture and/or the Relocation::origin.
See: