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;
108 os << static_cast<const BindingInfo&>(info);
114 enum class BIND_TYPES {
127 LIEF_LOCAL void set(
const details::dyld_chained_ptr_arm64e_bind& bind);
128 LIEF_LOCAL void set(
const details::dyld_chained_ptr_arm64e_auth_bind& bind);
129 LIEF_LOCAL void set(
const details::dyld_chained_ptr_arm64e_bind24& bind);
130 LIEF_LOCAL void set(
const details::dyld_chained_ptr_arm64e_auth_bind24& bind);
131 LIEF_LOCAL void set(
const details::dyld_chained_ptr_64_bind& bind);
132 LIEF_LOCAL void set(
const details::dyld_chained_ptr_32_bind& bind);
134 DYLD_CHAINED_FORMAT format_;
135 DYLD_CHAINED_PTR_FORMAT ptr_format_;
136 uint32_t offset_ = 0;
138 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:46
@ CHAINED
Binding associated with the Dyld info opcodes.
Definition BindingInfo.hpp:49
Class used to rebuild a Mach-O file.
Definition MachO/Builder.hpp:63
static bool classof(const BindingInfo *info)
Definition ChainedBindingInfo.hpp:98
details::dyld_chained_ptr_64_bind * p64_bind_
Definition ChainedBindingInfo.hpp:145
void accept(Visitor &visitor) const override
void offset(uint32_t offset)
Definition ChainedBindingInfo.hpp:80
friend std::ostream & operator<<(std::ostream &os, const ChainedBindingInfo &info)
Definition ChainedBindingInfo.hpp:106
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:71
DYLD_CHAINED_FORMAT format() const
Format of the imports.
Definition ChainedBindingInfo.hpp:66
friend class DyldChainedFixupsCreator
Definition ChainedBindingInfo.hpp:52
uint64_t address() const override
Address of the binding.
Definition ChainedBindingInfo.hpp:84
ChainedBindingInfo()=delete
void address(uint64_t address) override
Definition ChainedBindingInfo.hpp:88
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:94
ChainedBindingInfo & operator=(const ChainedBindingInfo &other)
friend class Builder
Definition ChainedBindingInfo.hpp:51
details::dyld_chained_ptr_arm64e_auth_bind24 * arm64_auth_bind24_
Definition ChainedBindingInfo.hpp:144
uint64_t sign_extended_addend() const
details::dyld_chained_ptr_arm64e_auth_bind * arm64_auth_bind_
Definition ChainedBindingInfo.hpp:142
~ChainedBindingInfo() override
details::dyld_chained_ptr_32_bind * p32_bind_
Definition ChainedBindingInfo.hpp:146
details::dyld_chained_ptr_arm64e_bind * arm64_bind_
Definition ChainedBindingInfo.hpp:141
ChainedBindingInfo(DYLD_CHAINED_FORMAT fmt, bool is_weak)
details::dyld_chained_ptr_arm64e_bind24 * arm64_bind24_
Definition ChainedBindingInfo.hpp:143
uint32_t offset() const
Original offset in the chain of this binding.
Definition ChainedBindingInfo.hpp:76
Definition DyldChainedFixupsCreator.hpp:41
Class that represents a Symbol in a Mach-O file.
Definition MachO/Symbol.hpp:47
Definition Visitor.hpp:212
Definition endianness_support.hpp:60
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:43
#define LIEF_LOCAL
Definition visibility.h:44