16#ifndef LIEF_MACHO_STUB_H
17#define LIEF_MACHO_STUB_H
69 target_info_(target_info),
70 stubs_(std::move(sections)),
82 return pos_ < rhs.pos_;
100 return LHS.pos_ == RHS.pos_;
104 return !(LHS == RHS);
110 const Section* find_section_offset(
size_t pos, uint64_t& offset)
const;
112 std::vector<const Section*> stubs_;
126 target_info_(target_info),
128 raw_(std::move(
raw)) {}
159 uint64_t address_ = 0;
161 std::vector<uint8_t> raw_;
Class which represents a MachO binary.
Definition MachO/Binary.hpp:94
Class that represents a Mach-O section.
Definition MachO/Section.hpp:49
Iterator & operator-=(std::ptrdiff_t n)
Definition Stub.hpp:94
Iterator(const Iterator &)=default
friend bool operator==(const Iterator &LHS, const Iterator &RHS)
Definition Stub.hpp:99
Iterator(Iterator &&) noexcept=default
std::ptrdiff_t operator-(const Iterator &R) const
Definition Stub.hpp:85
Iterator & operator+=(std::ptrdiff_t n)
Definition Stub.hpp:89
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:103
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:131
uint64_t address() const
The virtual address where the stub is located.
Definition Stub.hpp:136
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:738
Wrapper that contains an Object (T) or an error.
Definition errors.hpp:79
#define LIEF_MAYBE_UNUSED
Definition compiler_attributes.hpp:62
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
tcb::span< ElementType, Extent > span
Definition span.hpp:22
friend bool operator==(const Stub::target_info_t &lhs, const Stub::target_info_t &rhs)
Definition Stub.hpp:56
uint32_t subtype
Definition Stub.hpp:55
Header::CPU_TYPE arch
Definition Stub.hpp:54
#define LIEF_API
Definition visibility.h:45