16#ifndef LIEF_MACHO_EXPORT_INFO_COMMAND_H
17#define LIEF_MACHO_EXPORT_INFO_COMMAND_H
44 enum class KIND: uint64_t {
93 static constexpr auto MASK = uint64_t(3);
94 return KIND(flags_ & MASK);
111 return symbol() !=
nullptr;
134 return alias_location_;
137 return alias_location_;
147 uint64_t node_offset_ = 0;
149 uint64_t address_ = 0;
151 Symbol* symbol_ =
nullptr;
Class used to parse a single binary (i.e. non-FAT).
Definition BinaryParser.hpp:78
Class which represents a MachO binary.
Definition MachO/Binary.hpp:88
Class which represents a library dependency.
Definition DylibCommand.hpp:34
FLAGS
Definition ExportInfo.hpp:50
@ STATIC_RESOLVER
Definition ExportInfo.hpp:54
@ STUB_AND_RESOLVER
Definition ExportInfo.hpp:53
@ REEXPORT
Definition ExportInfo.hpp:52
@ WEAK_DEFINITION
Definition ExportInfo.hpp:51
void flags(uint64_t flags)
Definition ExportInfo.hpp:81
void accept(Visitor &visitor) const override
~ExportInfo() override=default
bool has_symbol() const
Check if a symbol is associated with this export.
Definition ExportInfo.hpp:110
friend class BinaryParser
Definition ExportInfo.hpp:40
Symbol * symbol()
Definition ExportInfo.hpp:118
void address(uint64_t addr)
Definition ExportInfo.hpp:105
ExportInfo(uint64_t address, uint64_t flags, uint64_t offset=0)
Definition ExportInfo.hpp:60
const Symbol * symbol() const
MachO::Symbol associated with this export or a nullptr if no symbol.
Definition ExportInfo.hpp:115
ExportInfo & operator=(ExportInfo copy)
uint64_t flags() const
Some information (ExportInfo::FLAGS) about the export. (like weak export, reexport,...
Definition ExportInfo.hpp:77
bool has(FLAGS flag) const
Check if the current entry contains the provided ExportInfo::FLAGS.
KIND kind() const
The export's kind (regular, thread local, absolute, ...).
Definition ExportInfo.hpp:92
DylibCommand * alias_library()
If the export is a ExportInfo::FLAGS::REEXPORT, this returns the (optional) library (MachO::DylibComm...
Definition ExportInfo.hpp:133
const DylibCommand * alias_library() const
Definition ExportInfo.hpp:136
friend std::ostream & operator<<(std::ostream &os, const ExportInfo &export_info)
friend class Binary
Definition ExportInfo.hpp:41
std::vector< FLAGS > flag_list_t
Definition ExportInfo.hpp:57
flag_list_t flags_list() const
The export flags() as a list.
uint64_t address() const
The address of the export.
Definition ExportInfo.hpp:102
uint64_t node_offset() const
Original offset in the export Trie.
Definition ExportInfo.hpp:71
ExportInfo(const ExportInfo ©)
const Symbol * alias() const
Definition ExportInfo.hpp:127
uint64_t other() const
Definition ExportInfo.hpp:97
void swap(ExportInfo &other) noexcept
Symbol * alias()
If the export is a ExportInfo::FLAGS::REEXPORT, this returns the (optional) MachO::Symbol.
Definition ExportInfo.hpp:124
KIND
Definition ExportInfo.hpp:44
@ REGULAR
Definition ExportInfo.hpp:45
@ THREAD_LOCAL_KIND
Definition ExportInfo.hpp:46
@ ABSOLUTE_KIND
Definition ExportInfo.hpp:47
Class that represents a Symbol in a Mach-O file.
Definition MachO/Symbol.hpp:47
Definition Visitor.hpp:210
#define ENABLE_BITMASK_OPERATORS(X)
Definition enums.hpp:24
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
const char * to_string(BuildToolVersion::TOOLS tool)
LIEF namespace.
Definition Abstract/Binary.hpp:40
#define LIEF_API
Definition visibility.h:41