LIEF: Library to Instrument Executable Formats Version 0.16.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
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;
50 friend class BinaryParser;
52 friend class DyldChainedFixupsCreator;
53 friend class ChainedBindingInfoList;
59 ChainedBindingInfo&
operator=(ChainedBindingInfo other);
63 void swap(ChainedBindingInfo& other) noexcept;
64 DYLD_CHAINED_FORMAT format()
const {
94 TYPES
type()
const override {
95 return TYPES::CHAINED;
98 static bool classof(
const BindingInfo* info) {
99 return info->type() == TYPES::CHAINED;
106 void accept(Visitor& visitor)
const override;
109 std::ostream&
operator<<(std::ostream& os,
const ChainedBindingInfo& info) {
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;
143 details::dyld_chained_ptr_arm64e_bind* arm64_bind_ =
nullptr;
144 details::dyld_chained_ptr_arm64e_auth_bind* arm64_auth_bind_;
145 details::dyld_chained_ptr_arm64e_bind24* arm64_bind24_;
146 details::dyld_chained_ptr_arm64e_auth_bind24* arm64_auth_bind24_;
147 details::dyld_chained_ptr_64_bind* p64_bind_;
148 details::dyld_chained_ptr_32_bind* p32_bind_;
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:39
Class used to rebuild a Mach-O file.
Definition MachO/Builder.hpp:57
This class represents a symbol binding operation associated with the LC_DYLD_CHAINED_FIXUPS command.
Definition ChainedBindingInfo.hpp:48
static bool classof(const BindingInfo *info)
Definition ChainedBindingInfo.hpp:98
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:109
ChainedBindingInfo(const ChainedBindingInfo &other)
ChainedBindingInfo(ChainedBindingInfo &&) noexcept
DYLD_CHAINED_PTR_FORMAT ptr_format() const
Format of the pointer.
Definition ChainedBindingInfo.hpp:71
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
uint64_t sign_extended_addend() const
~ChainedBindingInfo() override
Definition ChainedBindingInfo.hpp:102
ChainedBindingInfo(DYLD_CHAINED_FORMAT fmt, bool is_weak)
ChainedBindingInfo & operator=(ChainedBindingInfo other)
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 endianness_support.hpp:59
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
@ UNKNOWN
Definition MachO/enums.hpp:25
DYLD_CHAINED_PTR_FORMAT
Definition DyldChainedFormat.hpp:29
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42