16#ifndef LIEF_MACHO_CHAINED_BINDING_INFO_H
17#define LIEF_MACHO_CHAINED_BINDING_INFO_H
31struct dyld_chained_ptr_arm64e_bind;
32struct dyld_chained_ptr_arm64e_auth_bind;
33struct dyld_chained_ptr_arm64e_bind24;
34struct dyld_chained_ptr_arm64e_auth_bind24;
35struct dyld_chained_ptr_64_bind;
36struct dyld_chained_ptr_32_bind;
82 return address_ + offset_;
86 offset_ = address - address_;
92 return BindingInfo::TYPES::CHAINED;
96 return info->
type() == BindingInfo::TYPES::CHAINED;
107 os << static_cast<const BindingInfo&>(info);
113 enum class BIND_TYPES {
126 void set(
const details::dyld_chained_ptr_arm64e_bind& bind);
127 void set(
const details::dyld_chained_ptr_arm64e_auth_bind& bind);
128 void set(
const details::dyld_chained_ptr_arm64e_bind24& bind);
129 void set(
const details::dyld_chained_ptr_arm64e_auth_bind24& bind);
130 void set(
const details::dyld_chained_ptr_64_bind& bind);
131 void set(
const details::dyld_chained_ptr_32_bind& bind);
133 DYLD_CHAINED_FORMAT format_;
134 DYLD_CHAINED_PTR_FORMAT ptr_format_;
135 uint32_t offset_ = 0;
137 BIND_TYPES btypes_ = BIND_TYPES::UNKNOWN;
140 details::dyld_chained_ptr_arm64e_bind* arm64_bind_ =
nullptr;
Class used to parse a single binary (i.e. non-FAT)
Definition BinaryParser.hpp:74
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...
Class used to rebuild a Mach-O file.
Definition MachO/Builder.hpp:55
This class represents a symbol binding operation associated with the LC_DYLD_CHAINED_FIXUPS command.
Definition ChainedBindingInfo.hpp:46
static bool classof(const BindingInfo *info)
Definition ChainedBindingInfo.hpp:95
details::dyld_chained_ptr_64_bind * p64_bind_
Definition ChainedBindingInfo.hpp:144
void accept(Visitor &visitor) const override
void offset(uint32_t offset)
Definition ChainedBindingInfo.hpp:77
friend std::ostream & operator<<(std::ostream &os, const ChainedBindingInfo &info)
Definition ChainedBindingInfo.hpp:106
ChainedBindingInfo(const ChainedBindingInfo &other)
ChainedBindingInfo(ChainedBindingInfo &&) noexcept
DYLD_CHAINED_PTR_FORMAT ptr_format() const
Format of the pointer.
Definition ChainedBindingInfo.hpp:68
uint64_t address() const override
Address of the binding.
Definition ChainedBindingInfo.hpp:81
ChainedBindingInfo()=delete
void address(uint64_t address) override
Definition ChainedBindingInfo.hpp:85
details::dyld_chained_ptr_arm64e_auth_bind24 * arm64_auth_bind24_
Definition ChainedBindingInfo.hpp:143
uint64_t sign_extended_addend() const
details::dyld_chained_ptr_arm64e_auth_bind * arm64_auth_bind_
Definition ChainedBindingInfo.hpp:141
~ChainedBindingInfo() override
Definition ChainedBindingInfo.hpp:99
details::dyld_chained_ptr_32_bind * p32_bind_
Definition ChainedBindingInfo.hpp:145
ChainedBindingInfo(DYLD_CHAINED_FORMAT fmt, bool is_weak)
ChainedBindingInfo & operator=(ChainedBindingInfo other)
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 ChainedBindingInfo.hpp:91
details::dyld_chained_ptr_arm64e_bind24 * arm64_bind24_
Definition ChainedBindingInfo.hpp:142
uint32_t offset() const
Original offset in the chain of this binding.
Definition ChainedBindingInfo.hpp:73
Definition Visitor.hpp:224
DYLD_CHAINED_FORMAT
Definition DyldChainedFormat.hpp:22
DYLD_CHAINED_PTR_FORMAT
Definition DyldChainedFormat.hpp:29
LIEF namespace.
Definition Abstract/Binary.hpp:32
#define LIEF_API
Definition visibility.h:41