LIEF: Library to Instrument Executable Formats Version 0.16.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
16#ifndef LIEF_MACHO_DYLD_INFO_BINDING_INFO_H
17#define LIEF_MACHO_DYLD_INFO_BINDING_INFO_H
35 friend class BinaryParser;
38 enum class CLASS: uint64_t {
45 enum class TYPE: uint64_t {
54 uint64_t address, int64_t addend = 0,
55 int32_t oridnal = 0,
bool is_weak =
false,
56 bool is_non_weak_definition =
false, uint64_t offset = 0);
58 DyldBindingInfo&
operator=(
const DyldBindingInfo& other) =
default;
63 void swap(DyldBindingInfo& other) noexcept;
64 CLASS binding_class()
const {
83 return this->is_non_weak_definition_;
87 this->is_non_weak_definition_ = val;
95 BindingInfo::TYPES
type()
const override {
96 return BindingInfo::TYPES::DYLD_INFO;
99 static bool classof(
const BindingInfo* info) {
100 return info->type() == BindingInfo::TYPES::DYLD_INFO;
105 void accept(Visitor& visitor)
const override;
108 std::ostream&
operator<<(std::ostream& os,
const DyldBindingInfo& info) {
109 os << static_cast<const BindingInfo&>(info);
114 CLASS class_ = CLASS::STANDARD;
115 TYPE binding_type_ = TYPE::POINTER;
116 bool is_non_weak_definition_ =
false;
117 uint64_t offset_ = 0;
Class that provides an interface over a binding operation.
Definition BindingInfo.hpp:39
This class represents a symbol binding operation associated with the LC_DYLD_INFO bytecode.
Definition DyldBindingInfo.hpp:34
uint64_t original_offset() const
Original relative offset of the binding opcodes.
Definition DyldBindingInfo.hpp:91
static bool classof(const BindingInfo *info)
Definition DyldBindingInfo.hpp:99
DyldBindingInfo()=default
void accept(Visitor &visitor) const override
DyldBindingInfo & operator=(const DyldBindingInfo &other)=default
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:108
void binding_type(TYPE type)
Definition DyldBindingInfo.hpp:78
CLASS
Definition DyldBindingInfo.hpp:38
~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:95
bool is_non_weak_definition() const
Definition DyldBindingInfo.hpp:82
TYPE
Definition DyldBindingInfo.hpp:45
void set_non_weak_definition(bool val)
Definition DyldBindingInfo.hpp:86
void binding_class(CLASS bind_class)
Definition DyldBindingInfo.hpp:69
TYPE binding_type() const
Type of the binding. Most of the times it's TYPE::POINTER.
Definition DyldBindingInfo.hpp:74
DyldBindingInfo(DyldBindingInfo &&) noexcept=default
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:36
#define LIEF_API
Definition visibility.h:41