16#ifndef LIEF_MACHO_RELOCATION_OBJECT_COMMAND_H
17#define LIEF_MACHO_RELOCATION_OBJECT_COMMAND_H
30struct relocation_info;
31struct scattered_relocation_info;
43 using Relocation::Relocation;
55 std::unique_ptr<Relocation>
clone()
const override {
65 size_t size()
const override;
88 return ORIGIN::RELOC_TABLE;
94 void size(
size_t size)
override;
100 std::ostream&
print(std::ostream& os)
const override {
101 return Relocation::print(os);
105 return r.
origin() == Relocation::ORIGIN::RELOC_TABLE;
109 bool is_pcrel_ =
false;
110 bool is_scattered_ =
false;
Class used to parse a single binary (i.e. non-FAT)
Definition BinaryParser.hpp:74
Class that represents a relocation presents in the MachO object file (.o). Usually,...
Definition RelocationObject.hpp:38
void value(int32_t value)
bool is_scattered() const
true if the relocation is a scattered one
Definition RelocationObject.hpp:72
static bool classof(const Relocation &r)
Definition RelocationObject.hpp:104
std::unique_ptr< Relocation > clone() const override
Definition RelocationObject.hpp:55
void size(size_t size) override
void swap(RelocationObject &other) noexcept
void pc_relative(bool val) override
Definition RelocationObject.hpp:91
int32_t value() const
For scattered relocations: The address of the relocatable expression for the item in the file that ne...
RelocationObject & operator=(const RelocationObject &other)=default
bool is_pc_relative() const override
Whether the relocation is PC relative.
Definition RelocationObject.hpp:60
uint64_t address() const override
Address where the relocation is applied This address is relative to the start of the section where th...
size_t size() const override
Size of the relocation.
RelocationObject(const details::scattered_relocation_info &scattered_relocinfo)
RelocationObject(const RelocationObject &other)=default
void accept(Visitor &visitor) const override
RelocationObject()=default
~RelocationObject() override=default
ORIGIN origin() const override
Origin of the relocation. For this object it should be Relocation::ORIGIN::RELOC_TABLE)
Definition RelocationObject.hpp:87
std::ostream & print(std::ostream &os) const override
Definition RelocationObject.hpp:100
RelocationObject(const details::relocation_info &relocinfo)
Class that represents a Mach-O relocation.
Definition MachO/Relocation.hpp:40
virtual ORIGIN origin() const =0
Origin of the relocation.
ORIGIN
Definition MachO/Relocation.hpp:48
Definition Visitor.hpp:224
LIEF namespace.
Definition Abstract/Binary.hpp:32
#define LIEF_API
Definition visibility.h:41