16#ifndef LIEF_MACHO_STUB_H
17#define LIEF_MACHO_STUB_H
61 :
public iterator_facade_base<Iterator, std::random_access_iterator_tag,
68 target_info_(target_info),
69 stubs_(std::move(sections)),
81 return pos_ < rhs.pos_;
99 return LHS.pos_ == RHS.pos_;
103 return !(LHS == RHS);
109 const Section* find_section_offset(
size_t pos, uint64_t& offset)
const;
111 std::vector<const Section*> stubs_;
125 target_info_(target_info),
127 raw_(std::move(
raw)) {}
158 uint64_t address_ = 0;
160 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:93
Iterator(const Iterator &)=default
friend bool operator==(const Iterator &LHS, const Iterator &RHS)
Definition Stub.hpp:98
Iterator(Iterator &&) noexcept=default
std::ptrdiff_t operator-(const Iterator &R) const
Definition Stub.hpp:84
Iterator & operator+=(std::ptrdiff_t n)
Definition Stub.hpp:88
Iterator(target_info_t target_info, std::vector< const Section * > sections, size_t pos)
Definition Stub.hpp:66
Iterator & operator=(const Iterator &)=default
friend bool operator!=(const Iterator &LHS, const Iterator &RHS)
Definition Stub.hpp:102
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:130
uint64_t address() const
The virtual address where the stub is located.
Definition Stub.hpp:135
Stub & operator=(const Stub &)=default
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
uint32_t subtype
Definition Stub.hpp:55
Header::CPU_TYPE arch
Definition Stub.hpp:54
friend bool operator==(Stub::target_info_t lhs, Stub::target_info_t rhs)
Definition Stub.hpp:56
#define LIEF_API
Definition visibility.h:45