16#ifndef LIEF_MACHO_SYMBOL_COMMAND_H
17#define LIEF_MACHO_SYMBOL_COMMAND_H
47 std::unique_ptr<LoadCommand>
clone()
const override {
48 return std::unique_ptr<SymbolCommand>(
new SymbolCommand(*
this));
55 return symbols_offset_;
65 return strings_offset_;
74 symbols_offset_ = offset;
80 strings_offset_ = offset;
103 return original_str_size_;
107 return original_nb_symbols_;
110 std::ostream&
print(std::ostream& os)
const override;
119 uint32_t symbols_offset_ = 0;
120 uint32_t nb_symbols_ = 0;
121 uint32_t strings_offset_ = 0;
122 uint32_t strings_size_ = 0;
124 uint32_t original_str_size_ = 0;
125 uint32_t original_nb_symbols_ = 0;
Class used to parse a single binary (i.e. non-FAT).
Definition BinaryParser.hpp:79
Definition LinkEdit.hpp:47
uint32_t size() const
Size of the command (should be greater than sizeof(load_command)).
Definition LoadCommand.hpp:135
LoadCommand::TYPE command() const
Command type.
Definition LoadCommand.hpp:130
@ SYMTAB
Definition LoadCommand.hpp:49
span< const uint8_t > string_table() const
Definition SymbolCommand.hpp:94
uint32_t strings_offset() const
Offset from the start of the file to the string table.
Definition SymbolCommand.hpp:64
void accept(Visitor &visitor) const override
span< uint8_t > string_table()
Definition SymbolCommand.hpp:98
friend class BinaryParser
Definition SymbolCommand.hpp:37
std::ostream & print(std::ostream &os) const override
uint32_t numberof_symbols() const
Number of symbols registered.
Definition SymbolCommand.hpp:59
void numberof_symbols(uint32_t nb)
Definition SymbolCommand.hpp:76
SymbolCommand & operator=(const SymbolCommand ©)=default
SymbolCommand(const details::symtab_command &command)
uint32_t original_nb_symbols() const
Definition SymbolCommand.hpp:106
friend class LinkEdit
Definition SymbolCommand.hpp:38
~SymbolCommand() override=default
std::unique_ptr< LoadCommand > clone() const override
Definition SymbolCommand.hpp:47
span< uint8_t > symbol_table()
Definition SymbolCommand.hpp:90
uint32_t strings_size() const
Size of the string table.
Definition SymbolCommand.hpp:69
uint32_t symbol_offset() const
Offset from the start of the file to the n_list associated with the command.
Definition SymbolCommand.hpp:54
SymbolCommand(const SymbolCommand ©)=default
void symbol_offset(uint32_t offset)
Definition SymbolCommand.hpp:73
static bool classof(const LoadCommand *cmd)
Definition SymbolCommand.hpp:114
void strings_offset(uint32_t offset)
Definition SymbolCommand.hpp:79
span< const uint8_t > symbol_table() const
Definition SymbolCommand.hpp:86
void strings_size(uint32_t size)
Definition SymbolCommand.hpp:82
uint32_t original_str_size() const
Definition SymbolCommand.hpp:102
Definition Visitor.hpp:212
#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:41
tcb::span< ElementType, Extent > span
Definition span.hpp:22
#define LIEF_API
Definition visibility.h:45