16#ifndef LIEF_MACHO_SYMBOL_COMMAND_H
17#define LIEF_MACHO_SYMBOL_COMMAND_H
46 std::unique_ptr<LoadCommand>
clone()
const override {
47 return std::unique_ptr<SymbolCommand>(
new SymbolCommand(*
this));
54 return symbols_offset_;
64 return strings_offset_;
73 symbols_offset_ = offset;
79 strings_offset_ = offset;
102 return original_str_size_;
106 return original_nb_symbols_;
109 std::ostream&
print(std::ostream& os)
const override;
114 return cmd->
command() == LoadCommand::TYPE::SYMTAB;
118 uint32_t symbols_offset_ = 0;
119 uint32_t nb_symbols_ = 0;
120 uint32_t strings_offset_ = 0;
121 uint32_t strings_size_ = 0;
123 uint32_t original_str_size_ = 0;
124 uint32_t original_nb_symbols_ = 0;
Class used to parse a single binary (i.e. non-FAT)
Definition BinaryParser.hpp:74
Definition LinkEdit.hpp:42
Based class for the Mach-O load commands.
Definition LoadCommand.hpp:36
LoadCommand::TYPE command() const
Command type.
Definition LoadCommand.hpp:122
Class that represents the LC_SYMTAB command.
Definition SymbolCommand.hpp:35
span< const uint8_t > string_table() const
Definition SymbolCommand.hpp:93
uint32_t strings_offset() const
Offset from the start of the file to the string table.
Definition SymbolCommand.hpp:63
void accept(Visitor &visitor) const override
span< uint8_t > string_table()
Definition SymbolCommand.hpp:97
std::ostream & print(std::ostream &os) const override
uint32_t numberof_symbols() const
Number of symbols registered.
Definition SymbolCommand.hpp:58
void numberof_symbols(uint32_t nb)
Definition SymbolCommand.hpp:75
SymbolCommand & operator=(const SymbolCommand ©)=default
SymbolCommand(const details::symtab_command &command)
uint32_t original_nb_symbols() const
Definition SymbolCommand.hpp:105
~SymbolCommand() override=default
std::unique_ptr< LoadCommand > clone() const override
Definition SymbolCommand.hpp:46
span< uint8_t > symbol_table()
Definition SymbolCommand.hpp:89
uint32_t strings_size() const
Size of the size string table.
Definition SymbolCommand.hpp:68
uint32_t symbol_offset() const
Offset from the start of the file to the n_list associated with the command.
Definition SymbolCommand.hpp:53
SymbolCommand(const SymbolCommand ©)=default
void symbol_offset(uint32_t offset)
Definition SymbolCommand.hpp:72
static bool classof(const LoadCommand *cmd)
Definition SymbolCommand.hpp:113
void strings_offset(uint32_t offset)
Definition SymbolCommand.hpp:78
span< const uint8_t > symbol_table() const
Definition SymbolCommand.hpp:85
void strings_size(uint32_t size)
Definition SymbolCommand.hpp:81
uint32_t original_str_size() const
Definition SymbolCommand.hpp:101
Definition Visitor.hpp:224
LIEF namespace.
Definition Abstract/Binary.hpp:32
tcb::span< ElementType, Extent > span
Definition span.hpp:22
#define LIEF_API
Definition visibility.h:41