Go to the documentation of this file.
16#ifndef LIEF_MACHO_MAIN_COMMAND_H
17#define LIEF_MACHO_MAIN_COMMAND_H
28struct entry_point_command;
39 MainCommand&
operator=(
const MainCommand& copy) =
default;
42 std::unique_ptr<LoadCommand>
clone()
const override {
43 return std::unique_ptr<MainCommand>(
new MainCommand(*
this));
60 entrypoint_ = entrypoint;
63 stack_size_ = stacksize;
66 std::ostream&
print(std::ostream& os)
const override;
68 void accept(Visitor& visitor)
const override;
70 static bool classof(
const LoadCommand* cmd) {
71 return cmd->
command() == LoadCommand::TYPE::MAIN;
75 uint64_t entrypoint_ = 0;
76 uint64_t stack_size_ = 0;
Class that represent the LC_MAIN command. This kind of command can be used to determine the entrypoin...
Definition MainCommand.hpp:33
uint64_t entrypoint() const
Offset of the main function relative to the __TEXT segment.
Definition MainCommand.hpp:50
MainCommand(const MainCommand ©)=default
void entrypoint(uint64_t entrypoint)
Definition MainCommand.hpp:59
MainCommand(uint64_t entrypoint, uint64_t stacksize)
uint64_t stack_size() const
The initial stack size.
Definition MainCommand.hpp:55
std::unique_ptr< LoadCommand > clone() const override
Definition MainCommand.hpp:42
~MainCommand() override=default
MainCommand(const details::entry_point_command &cmd)
std::ostream & print(std::ostream &os) const override
void accept(Visitor &visitor) const override
void stack_size(uint64_t stacksize)
Definition MainCommand.hpp:62
static bool classof(const LoadCommand *cmd)
Definition MainCommand.hpp:70
MainCommand & operator=(const MainCommand ©)=default