LIEF: Library to Instrument Executable Formats Version 0.15.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
LIEF::MachO::FunctionStarts Class Reference

Class which represents the LC_FUNCTION_STARTS command. More...

#include <FunctionStarts.hpp>

Inheritance diagram for LIEF::MachO::FunctionStarts:
Inheritance graph
[legend]
Collaboration diagram for LIEF::MachO::FunctionStarts:
Collaboration graph
[legend]

Public Member Functions

 FunctionStarts (const details::linkedit_data_command &cmd)
 
FunctionStartsoperator= (const FunctionStarts &copy)
 
 FunctionStarts (const FunctionStarts &copy)
 
FunctionStartsclone () const override
 
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.
 
const std::vector< uint64_t > & functions () const
 Addresses of every function entry point in the executable.
 
std::vector< uint64_t > & functions ()
 
void add_function (uint64_t address)
 Add a new function.
 
void data_offset (uint32_t offset)
 
void data_size (uint32_t size)
 
void functions (const std::vector< uint64_t > &funcs)
 
span< const uint8_t > content () const
 
span< uint8_t > content ()
 
void accept (Visitor &visitor) const override
 
std::ostream & print (std::ostream &os) const override
 
- Public Member Functions inherited from LIEF::MachO::LoadCommand
 LoadCommand (const details::load_command &command)
 
 LoadCommand (LOAD_COMMAND_TYPES type, uint32_t size)
 
LoadCommandoperator= (LoadCommand copy)
 
 LoadCommand (const LoadCommand &copy)
 
void swap (LoadCommand &other)
 
LOAD_COMMAND_TYPES command () const
 Command type.
 
uint32_t size () const
 Size of the command (should be greather than sizeof(load_command))
 
span< const uint8_t > data () const
 Raw command.
 
uint64_t command_offset () const
 Offset of the command within the Load Command Table
 
void data (const raw_t &data)
 
void command (LOAD_COMMAND_TYPES command)
 
void size (uint32_t size)
 
void command_offset (uint64_t offset)
 
void accept (Visitor &visitor) const override
 
- Public Member Functions inherited from LIEF::Object
 Object (const Object &other)
 
Objectoperator= (const Object &other)
 
template<class T >
output_t< T > as ()
 
template<class T >
output_const_t< T > as () const
 
virtual bool operator== (const Object &other) const
 
virtual bool operator!= (const Object &other) const
 

Static Public Member Functions

static bool classof (const LoadCommand *cmd)
 
- Static Public Member Functions inherited from LIEF::MachO::LoadCommand
static bool is_linkedit_data (const LoadCommand &cmd)
 

Additional Inherited Members

- Public Types inherited from LIEF::MachO::LoadCommand
using raw_t = std::vector<uint8_t>
 
- Public Types inherited from LIEF::Object
template<class T >
using output_t = add_pointer_t<decay_t<T>>
 
template<class T >
using output_const_t = add_pointer_t<add_const_t<decay_t<T>>>
 

Detailed Description

Class which represents the LC_FUNCTION_STARTS command.

This command is an array of ULEB128 encoded values

Member Function Documentation

◆ accept()

void LIEF::MachO::FunctionStarts::accept ( Visitor & visitor) const
overridevirtual

Implements LIEF::Object.

◆ clone()

FunctionStarts * LIEF::MachO::FunctionStarts::clone ( ) const
overridevirtual

Reimplemented from LIEF::MachO::LoadCommand.

◆ functions()

const std::vector< uint64_t > & LIEF::MachO::FunctionStarts::functions ( ) const

Addresses of every function entry point in the executable.

This allows functions to exist for which there are no entries in the symbol table.

Warning
The address is relative to the __TEXT segment

◆ print()

std::ostream & LIEF::MachO::FunctionStarts::print ( std::ostream & os) const
overridevirtual

Reimplemented from LIEF::MachO::LoadCommand.


The documentation for this class was generated from the following file: