16#ifndef LIEF_MACHO_DYLD_INFO_BINDING_INFO_H
17#define LIEF_MACHO_DYLD_INFO_BINDING_INFO_H
20#include "LIEF/visibility.h"
21#include "LIEF/types.hpp"
22#include "LIEF/MachO/BindingInfo.hpp"
23#include "LIEF/MachO/enums.hpp"
42 uint64_t address, int64_t addend = 0,
43 int32_t oridnal = 0,
bool is_weak =
false,
44 bool is_non_weak_definition =
false, uint64_t offset = 0);
59 void binding_type(BIND_TYPES type);
61 bool is_non_weak_definition()
const {
62 return this->is_non_weak_definition_;
65 void set_non_weak_definition(
bool val) {
66 this->is_non_weak_definition_ = val;
73 return BindingInfo::TYPES::DYLD_INFO;
77 return info->
type() == BindingInfo::TYPES::DYLD_INFO;
80 ~DyldBindingInfo()
override;
82 void accept(
Visitor& visitor)
const override;
84 LIEF_API
friend std::ostream& operator<<(std::ostream& os,
const DyldBindingInfo& binding_info);
86 BINDING_CLASS class_ = BINDING_CLASS::BIND_CLASS_STANDARD;
87 BIND_TYPES binding_type_ = BIND_TYPES::BIND_TYPE_POINTER;
88 bool is_non_weak_definition_ =
false;
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:40
TYPES
Definition BindingInfo.hpp:45
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:35
uint64_t original_offset() const
Original relative offset of the binding opcodes.
BIND_TYPES binding_type() const
Type of the binding. Most of the times it's BIND_TYPES::BIND_TYPE_POINTER.
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:72
BINDING_CLASS binding_class() const
Class of the binding (weak, lazy, ...)
Definition Visitor.hpp:219
BINDING_CLASS
Within the dyld_info_command there are differents area of binding. These enums tag these area.
Definition MachO/enums.hpp:257
LIEF namespace.
Definition Abstract/Binary.hpp:32