16#ifndef LIEF_MACHO_DYLD_INFO_BINDING_INFO_H
17#define LIEF_MACHO_DYLD_INFO_BINDING_INFO_H
45 enum class TYPE: uint64_t {
55 int32_t oridnal = 0,
bool is_weak =
false,
84 return this->is_non_weak_definition_;
88 this->is_non_weak_definition_ = val;
110 os << static_cast<const BindingInfo&>(info);
115 CLASS class_ = CLASS::STANDARD;
116 TYPE binding_type_ = TYPE::POINTER;
117 bool is_non_weak_definition_ =
false;
118 uint64_t offset_ = 0;
TYPES
Definition BindingInfo.hpp:45
@ DYLD_INFO
Definition BindingInfo.hpp:47
virtual uint64_t address() const
Address of the binding.
Definition BindingInfo.hpp:105
int64_t addend() const
Value added to the segment's virtual address when bound.
Definition BindingInfo.hpp:122
uint64_t original_offset() const
Original relative offset of the binding opcodes.
Definition DyldBindingInfo.hpp:92
static bool classof(const BindingInfo *info)
Definition DyldBindingInfo.hpp:100
DyldBindingInfo()=default
void accept(Visitor &visitor) const override
DyldBindingInfo & operator=(DyldBindingInfo &&) noexcept=default
void swap(DyldBindingInfo &other) noexcept
CLASS binding_class() const
Class of the binding (weak, lazy, ...).
Definition DyldBindingInfo.hpp:67
DyldBindingInfo & operator=(const DyldBindingInfo &other)=default
friend class BinaryParser
Definition DyldBindingInfo.hpp:35
DyldBindingInfo(const DyldBindingInfo &other)=default
DyldBindingInfo(CLASS cls, TYPE type, uint64_t address, int64_t addend=0, int32_t oridnal=0, bool is_weak=false, bool is_non_weak_definition=false, uint64_t offset=0)
friend std::ostream & operator<<(std::ostream &os, const DyldBindingInfo &info)
Definition DyldBindingInfo.hpp:109
void binding_type(TYPE type)
Definition DyldBindingInfo.hpp:79
CLASS
Definition DyldBindingInfo.hpp:38
@ THREADED
Definition DyldBindingInfo.hpp:42
@ WEAK
Definition DyldBindingInfo.hpp:39
@ LAZY
Definition DyldBindingInfo.hpp:40
@ STANDARD
Definition DyldBindingInfo.hpp:41
~DyldBindingInfo() override=default
BindingInfo::TYPES type() const override
The type of the binding. This type provides the origin of the binding (LC_DYLD_INFO or LC_DYLD_CHAINE...
Definition DyldBindingInfo.hpp:96
bool is_non_weak_definition() const
Definition DyldBindingInfo.hpp:83
TYPE
Definition DyldBindingInfo.hpp:45
@ TEXT_PCREL32
Definition DyldBindingInfo.hpp:48
@ POINTER
Definition DyldBindingInfo.hpp:46
@ TEXT_ABSOLUTE32
Definition DyldBindingInfo.hpp:47
void set_non_weak_definition(bool val)
Definition DyldBindingInfo.hpp:87
void binding_class(CLASS bind_class)
Definition DyldBindingInfo.hpp:70
TYPE binding_type() const
Type of the binding. Most of the times it's TYPE::POINTER.
Definition DyldBindingInfo.hpp:75
Definition Visitor.hpp:210
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
const char * to_string(BuildToolVersion::TOOLS tool)
LIEF namespace.
Definition Abstract/Binary.hpp:40
#define LIEF_API
Definition visibility.h:41