16#ifndef LIEF_MACHO_STUB_H
17#define LIEF_MACHO_STUB_H
69 target_info_(target_info),
70 stubs_(std::move(sections)),
84 return pos_ < rhs.pos_;
102 return LHS.pos_ == RHS.pos_;
106 return !(LHS == RHS);
112 const Section* find_section_offset(
size_t pos, uint64_t& offset)
const;
114 std::vector<const Section*> stubs_;
127 target_info_(target_info),
161 uint64_t address_ = 0;
162 mutable uint64_t target_addr_ = 0;
163 std::vector<uint8_t> raw_;
Class that represents a Mach-O section.
Definition MachO/Section.hpp:46
Iterator & operator-=(std::ptrdiff_t n)
Definition Stub.hpp:96
Iterator(const Iterator &)=default
friend bool operator==(const Iterator &LHS, const Iterator &RHS)
Definition Stub.hpp:101
Iterator(Iterator &&) noexcept=default
std::ptrdiff_t operator-(const Iterator &R) const
Definition Stub.hpp:87
Iterator & operator+=(std::ptrdiff_t n)
Definition Stub.hpp:91
Iterator(target_info_t target_info, std::vector< const Section * > sections, size_t pos)
Definition Stub.hpp:67
Iterator & operator=(const Iterator &)=default
friend bool operator!=(const Iterator &LHS, const Iterator &RHS)
Definition Stub.hpp:105
This class represents a stub entry in sections like __stubs,__auth_stubs.
Definition Stub.hpp:50
Stub(Stub &&) noexcept=default
Stub(const Stub &)=default
friend std::ostream & operator<<(std::ostream &os, const Stub &stub)
result< uint64_t > target() const
The address resolved by this stub.
span< const uint8_t > raw() const
The (raw) instructions of this entry as a slice of bytes.
Definition Stub.hpp:133
uint64_t address() const
The virtual address where the stub is located.
Definition Stub.hpp:138
Stub & operator=(const Stub &)=default
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of ...
Definition iterators.hpp:590
LIEF namespace.
Definition Abstract/Binary.hpp:32
tcb::span< ElementType, Extent > span
Definition span.hpp:22
tl::expected< T, lief_errors > result
Wrapper that contains an Object (T) or an error.
Definition errors.hpp:75
friend bool operator==(const Stub::target_info_t &lhs, const Stub::target_info_t &rhs)
Definition Stub.hpp:55
uint32_t subtype
Definition Stub.hpp:54
Header::CPU_TYPE arch
Definition Stub.hpp:53
#define LIEF_API
Definition visibility.h:41