16#ifndef LIEF_MACHO_FUNCTION_STARTS_COMMAND_H
17#define LIEF_MACHO_FUNCTION_STARTS_COMMAND_H
23#include "LIEF/visibility.h"
24#include "LIEF/types.hpp"
26#include "LIEF/span.hpp"
27#include "LIEF/MachO/LoadCommand.hpp"
35struct linkedit_data_command;
68 std::vector<uint64_t>& functions();
73 void data_offset(uint32_t offset);
74 void data_size(uint32_t size);
75 void functions(
const std::vector<uint64_t>& funcs);
77 span<const uint8_t> content()
const {
81 span<uint8_t> content() {
85 ~FunctionStarts()
override;
88 void accept(
Visitor& visitor)
const override;
90 std::ostream& print(std::ostream& os)
const override;
92 static bool classof(
const LoadCommand* cmd);
96 uint32_t data_offset_ = 0;
97 uint32_t data_size_ = 0;
98 span<uint8_t> content_;
99 std::vector<uint64_t> functions_;
Class used to parse a single binary (i.e. non-FAT)
Definition BinaryParser.hpp:73
Class which represents the LC_FUNCTION_STARTS command.
Definition FunctionStarts.hpp:42
const std::vector< uint64_t > & functions() const
Addresses of every function entry point in the executable.
uint32_t data_offset() const
Offset in the __LINKEDIT SegmentCommand where start functions are located.
uint32_t data_size() const
Size of the functions list in the binary.
void add_function(uint64_t address)
Add a new function.
Definition LinkEdit.hpp:48
Based class for the Mach-O load commands.
Definition LoadCommand.hpp:39
Definition Visitor.hpp:219
LIEF namespace.
Definition Abstract/Binary.hpp:32