16#ifndef LIEF_MACHO_DYLD_EXPORTS_TRIE_H
17#define LIEF_MACHO_DYLD_EXPORTS_TRIE_H
34struct linkedit_data_command;
60 std::unique_ptr<LoadCommand>
clone()
const override {
80 data_offset_ = offset;
108 std::ostream&
print(std::ostream& os)
const override;
118 uint32_t data_offset_ = 0;
119 uint32_t data_size_ = 0;
125 export_info_t export_info_;
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:89
Class used to rebuild a Mach-O file.
Definition MachO/Builder.hpp:63
Class that represents the LC_DYLD_EXPORTS_TRIE command.
Definition DyldExportsTrie.hpp:41
std::unique_ptr< LoadCommand > clone() const override
Definition DyldExportsTrie.hpp:60
void accept(Visitor &visitor) const override
ref_iterator< export_info_t &, ExportInfo * > it_export_info
Iterator which outputs const ExportInfo&.
Definition DyldExportsTrie.hpp:52
span< const uint8_t > content() const
Definition DyldExportsTrie.hpp:86
DyldExportsTrie(const details::linkedit_data_command &cmd)
it_const_export_info exports() const
Definition DyldExportsTrie.hpp:95
friend class BinaryParser
Definition DyldExportsTrie.hpp:42
it_export_info exports()
Iterator over the ExportInfo entries.
Definition DyldExportsTrie.hpp:91
void data_size(uint32_t size)
Definition DyldExportsTrie.hpp:82
std::vector< std::unique_ptr< ExportInfo > > export_info_t
Internal container for storing ExportInfo.
Definition DyldExportsTrie.hpp:49
std::string show_export_trie() const
Print the exports trie in a human-readable way.
~DyldExportsTrie() override
void data_offset(uint32_t offset)
Definition DyldExportsTrie.hpp:79
friend class Builder
Definition DyldExportsTrie.hpp:43
std::ostream & print(std::ostream &os) const override
friend class Binary
Definition DyldExportsTrie.hpp:45
const_ref_iterator< const export_info_t &, ExportInfo * > it_const_export_info
Iterator which outputs const ExportInfo&.
Definition DyldExportsTrie.hpp:55
friend class LinkEdit
Definition DyldExportsTrie.hpp:44
ExportInfo * add(std::unique_ptr< ExportInfo > info)
Add an entry in the current trie. See also: LIEF::MachO::Binary::add_exported_function.
uint32_t data_size() const
Size of the LC_DYLD_EXPORTS_TRIE payload.
Definition DyldExportsTrie.hpp:75
void swap(DyldExportsTrie &other) noexcept
static bool classof(const LoadCommand *cmd)
Definition DyldExportsTrie.hpp:110
uint32_t data_offset() const
Offset of the LC_DYLD_EXPORTS_TRIE. This offset should point in the __LINKEDIT segment.
Definition DyldExportsTrie.hpp:70
Class that provides an interface over the Dyld export info.
Definition ExportInfo.hpp:38
Definition LinkEdit.hpp:45
uint32_t size() const
Size of the command (should be greater than sizeof(load_command)).
Definition LoadCommand.hpp:133
LoadCommand::TYPE command() const
Command type.
Definition LoadCommand.hpp:128
@ DYLD_EXPORTS_TRIE
Definition LoadCommand.hpp:98
Definition Visitor.hpp:212
Iterator which returns reference on container's values.
Definition iterators.hpp:45
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Definition endianness_support.hpp:60
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
ref_iterator< CT, U, typename decay_t< CT >::const_iterator > const_ref_iterator
Iterator which returns a const ref on container's values.
Definition iterators.hpp:318
#define LIEF_API
Definition visibility.h:45
#define LIEF_LOCAL
Definition visibility.h:46