16#ifndef LIEF_MACHO_CHAINED_BINDING_INFO_H
17#define LIEF_MACHO_CHAINED_BINDING_INFO_H
29class ChainedBindingInfoList;
33struct dyld_chained_ptr_arm64e_bind;
34struct dyld_chained_ptr_arm64e_auth_bind;
35struct dyld_chained_ptr_arm64e_bind24;
36struct dyld_chained_ptr_arm64e_auth_bind24;
37struct dyld_chained_ptr_64_bind;
38struct dyld_chained_ptr_32_bind;
110 os << static_cast<const BindingInfo&>(info);
116 enum class BIND_TYPES {
129 LIEF_LOCAL void set(
const details::dyld_chained_ptr_arm64e_bind& bind);
130 LIEF_LOCAL void set(
const details::dyld_chained_ptr_arm64e_auth_bind& bind);
131 LIEF_LOCAL void set(
const details::dyld_chained_ptr_arm64e_bind24& bind);
132 LIEF_LOCAL void set(
const details::dyld_chained_ptr_arm64e_auth_bind24& bind);
133 LIEF_LOCAL void set(
const details::dyld_chained_ptr_64_bind& bind);
134 LIEF_LOCAL void set(
const details::dyld_chained_ptr_32_bind& bind);
136 DYLD_CHAINED_FORMAT format_;
137 DYLD_CHAINED_PTR_FORMAT ptr_format_;
138 uint32_t offset_ = 0;
140 BIND_TYPES btypes_ = BIND_TYPES::UNKNOWN;
Class used to parse a single binary (i.e. non-FAT).
Definition BinaryParser.hpp:78
TYPES
Definition BindingInfo.hpp:45
@ CHAINED
Binding associated with the Dyld info opcodes.
Definition BindingInfo.hpp:48
Class used to rebuild a Mach-O file.
Definition MachO/Builder.hpp:63
static bool classof(const BindingInfo *info)
Definition ChainedBindingInfo.hpp:100
details::dyld_chained_ptr_64_bind * p64_bind_
Definition ChainedBindingInfo.hpp:147
void accept(Visitor &visitor) const override
void offset(uint32_t offset)
Definition ChainedBindingInfo.hpp:82
friend std::ostream & operator<<(std::ostream &os, const ChainedBindingInfo &info)
Definition ChainedBindingInfo.hpp:109
friend class ChainedBindingInfoList
Definition ChainedBindingInfo.hpp:53
ChainedBindingInfo(const ChainedBindingInfo &other)
ChainedBindingInfo(ChainedBindingInfo &&) noexcept
friend class BinaryParser
Definition ChainedBindingInfo.hpp:50
DYLD_CHAINED_PTR_FORMAT ptr_format() const
Format of the pointer.
Definition ChainedBindingInfo.hpp:73
DYLD_CHAINED_FORMAT format() const
Format of the imports.
Definition ChainedBindingInfo.hpp:68
friend class DyldChainedFixupsCreator
Definition ChainedBindingInfo.hpp:52
uint64_t address() const override
Address of the binding.
Definition ChainedBindingInfo.hpp:86
ChainedBindingInfo()=delete
void address(uint64_t address) override
Definition ChainedBindingInfo.hpp:90
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:96
void swap(ChainedBindingInfo &other) noexcept
friend class Builder
Definition ChainedBindingInfo.hpp:51
details::dyld_chained_ptr_arm64e_auth_bind24 * arm64_auth_bind24_
Definition ChainedBindingInfo.hpp:146
uint64_t sign_extended_addend() const
details::dyld_chained_ptr_arm64e_auth_bind * arm64_auth_bind_
Definition ChainedBindingInfo.hpp:144
~ChainedBindingInfo() override
details::dyld_chained_ptr_32_bind * p32_bind_
Definition ChainedBindingInfo.hpp:148
details::dyld_chained_ptr_arm64e_bind * arm64_bind_
Definition ChainedBindingInfo.hpp:143
ChainedBindingInfo(DYLD_CHAINED_FORMAT fmt, bool is_weak)
ChainedBindingInfo & operator=(ChainedBindingInfo other)
details::dyld_chained_ptr_arm64e_bind24 * arm64_bind24_
Definition ChainedBindingInfo.hpp:145
uint32_t offset() const
Original offset in the chain of this binding.
Definition ChainedBindingInfo.hpp:78
Definition DyldChainedFixupsCreator.hpp:41
Class that represents a Symbol in a Mach-O file.
Definition MachO/Symbol.hpp:47
Definition Visitor.hpp:210
Definition endianness_support.hpp:59
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
DYLD_CHAINED_FORMAT
Definition DyldChainedFormat.hpp:22
@ UNKNOWN
Definition MachO/enums.hpp:24
DYLD_CHAINED_PTR_FORMAT
Definition DyldChainedFormat.hpp:29
LIEF namespace.
Definition Abstract/Binary.hpp:40
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42