16#ifndef LIEF_MACHO_SYMBOL_COMMAND_H
17#define LIEF_MACHO_SYMBOL_COMMAND_H
48 std::unique_ptr<LoadCommand>
clone()
const override {
49 return std::make_unique<SymbolCommand>(*
this);
56 return symbols_offset_;
66 return strings_offset_;
75 symbols_offset_ = offset;
81 strings_offset_ = offset;
100 return string_table_;
104 return original_str_size_;
108 return original_nb_symbols_;
111 std::ostream&
print(std::ostream& os)
const override;
120 uint32_t symbols_offset_ = 0;
121 uint32_t nb_symbols_ = 0;
122 uint32_t strings_offset_ = 0;
123 uint32_t strings_size_ = 0;
125 uint32_t original_str_size_ = 0;
126 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:137
LoadCommand::TYPE command() const
Command type.
Definition LoadCommand.hpp:132
@ SYMTAB
Definition LoadCommand.hpp:50
span< const uint8_t > string_table() const
Definition SymbolCommand.hpp:95
uint32_t strings_offset() const
Offset from the start of the file to the string table.
Definition SymbolCommand.hpp:65
void accept(Visitor &visitor) const override
span< uint8_t > string_table()
Definition SymbolCommand.hpp:99
friend class BinaryParser
Definition SymbolCommand.hpp:38
std::ostream & print(std::ostream &os) const override
uint32_t numberof_symbols() const
Number of symbols registered.
Definition SymbolCommand.hpp:60
void numberof_symbols(uint32_t nb)
Definition SymbolCommand.hpp:77
SymbolCommand & operator=(const SymbolCommand ©)=default
SymbolCommand(const details::symtab_command &command)
uint32_t original_nb_symbols() const
Definition SymbolCommand.hpp:107
friend class LinkEdit
Definition SymbolCommand.hpp:39
~SymbolCommand() override=default
std::unique_ptr< LoadCommand > clone() const override
Definition SymbolCommand.hpp:48
span< uint8_t > symbol_table()
Definition SymbolCommand.hpp:91
uint32_t strings_size() const
Size of the string table.
Definition SymbolCommand.hpp:70
uint32_t symbol_offset() const
Offset from the start of the file to the n_list associated with the command.
Definition SymbolCommand.hpp:55
SymbolCommand(const SymbolCommand ©)=default
void symbol_offset(uint32_t offset)
Definition SymbolCommand.hpp:74
static bool classof(const LoadCommand *cmd)
Definition SymbolCommand.hpp:115
void strings_offset(uint32_t offset)
Definition SymbolCommand.hpp:80
span< const uint8_t > symbol_table() const
Definition SymbolCommand.hpp:87
void strings_size(uint32_t size)
Definition SymbolCommand.hpp:83
uint32_t original_str_size() const
Definition SymbolCommand.hpp:103
Definition Visitor.hpp:212
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Definition endianness_support.hpp:59
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
tcb::span< ElementType, Extent > span
Definition span.hpp:22
#define LIEF_API
Definition visibility.h:45