16#ifndef LIEF_MACHO_STUB_H
17#define LIEF_MACHO_STUB_H
70 target_info_(target_info),
71 stubs_(
std::move(sections)),
83 return pos_ < rhs.pos_;
101 return LHS.pos_ == RHS.pos_;
105 return !(LHS == RHS);
111 const Section* find_section_offset(
size_t pos, uint64_t& offset)
const;
113 std::vector<const Section*> stubs_;
127 target_info_(target_info),
160 uint64_t address_ = 0;
162 std::vector<uint8_t> raw_;
Class which represents a MachO binary.
Definition MachO/Binary.hpp:88
Class that represents a Mach-O section.
Definition MachO/Section.hpp:47
Iterator & operator-=(std::ptrdiff_t n)
Definition Stub.hpp:95
Iterator(const Iterator &)=default
friend bool operator==(const Iterator &LHS, const Iterator &RHS)
Definition Stub.hpp:100
Iterator(Iterator &&) noexcept=default
std::ptrdiff_t operator-(const Iterator &R) const
Definition Stub.hpp:86
Iterator & operator+=(std::ptrdiff_t n)
Definition Stub.hpp:90
Iterator(target_info_t target_info, std::vector< const Section * > sections, size_t pos)
Definition Stub.hpp:68
Iterator & operator=(const Iterator &)=default
friend bool operator!=(const Iterator &LHS, const Iterator &RHS)
Definition Stub.hpp:104
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:132
uint64_t address() const
The virtual address where the stub is located.
Definition Stub.hpp:137
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:685
Wrapper that contains an Object (T) or an error.
Definition errors.hpp:77
#define LIEF_MAYBE_UNUSED
Definition compiler_attributes.hpp:61
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
LIEF namespace.
Definition Abstract/Binary.hpp:40
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:57
uint32_t subtype
Definition Stub.hpp:56
Header::CPU_TYPE arch
Definition Stub.hpp:55
#define LIEF_API
Definition visibility.h:43