16#ifndef LIEF_MACHO_DYLD_INFO_BINDING_INFO_H
17#define LIEF_MACHO_DYLD_INFO_BINDING_INFO_H
21#include "LIEF/visibility.h"
22#include "LIEF/MachO/BindingInfo.hpp"
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);
69 void binding_class(CLASS bind_class) {
78 void binding_type(TYPE type) {
82 bool is_non_weak_definition()
const {
83 return this->is_non_weak_definition_;
86 void set_non_weak_definition(
bool val) {
87 this->is_non_weak_definition_ = val;
96 return BindingInfo::TYPES::DYLD_INFO;
100 return info->
type() == BindingInfo::TYPES::DYLD_INFO;
103 ~DyldBindingInfo()
override =
default;
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;
120LIEF_API
const char* to_string(DyldBindingInfo::CLASS e);
121LIEF_API
const char* to_string(DyldBindingInfo::TYPE e);
Class used to parse a single binary (i.e. non-FAT)
Definition BinaryParser.hpp:73
Class that provides an interface over a binding operation.
Definition BindingInfo.hpp:38
TYPES
Definition BindingInfo.hpp:43
virtual TYPES type() const =0
The type of the binding. This type provides the origin of the binding (LC_DYLD_INFO or LC_DYLD_CHAINE...
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
CLASS binding_class() const
Class of the binding (weak, lazy, ...)
Definition DyldBindingInfo.hpp:66
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
TYPE binding_type() const
Type of the binding. Most of the times it's BIND_TYPES::BIND_TYPE_POINTER.
Definition DyldBindingInfo.hpp:74
Definition Visitor.hpp:219
LIEF namespace.
Definition Abstract/Binary.hpp:32