LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::ELF::Builder Class Reference

Class which takes an ELF::Binary object and reconstructs a valid binary. More...

#include <Builder.hpp>

Classes

struct  config_t
 Configuration options to tweak the building process. More...

Public Member Functions

 Builder (Binary &binary, const config_t &config)
 Builder (Binary &binary)
 Builder ()=delete
 ~Builder ()
void build ()
 Perform the build of the provided ELF binary.
config_tconfig ()
const std::vector< uint8_t > & get_build ()
 Return the built ELF binary as a byte vector.
void write (const std::string &filename) const
 Write the built ELF binary in the filename given in parameter.
void write (std::ostream &os) const
 Write the built ELF binary in the stream os given in parameter.

Detailed Description

Class which takes an ELF::Binary object and reconstructs a valid binary.

This interface assumes that the layout of input ELF binary is correct (i.e. the binary can run).

Constructor & Destructor Documentation

◆ Builder() [1/3]

LIEF::ELF::Builder::Builder ( Binary & binary,
const config_t & config )

References config().

Referenced by Builder().

◆ Builder() [2/3]

LIEF::ELF::Builder::Builder ( Binary & binary)
inline

References Builder().

◆ Builder() [3/3]

LIEF::ELF::Builder::Builder ( )
delete

◆ ~Builder()

LIEF::ELF::Builder::~Builder ( )

Member Function Documentation

◆ build()

void LIEF::ELF::Builder::build ( )

Perform the build of the provided ELF binary.

Referenced by write().

◆ config()

config_t & LIEF::ELF::Builder::config ( )
inline

Referenced by Builder().

◆ get_build()

const std::vector< uint8_t > & LIEF::ELF::Builder::get_build ( )

Return the built ELF binary as a byte vector.

◆ write() [1/2]

void LIEF::ELF::Builder::write ( const std::string & filename) const

Write the built ELF binary in the filename given in parameter.

◆ write() [2/2]

void LIEF::ELF::Builder::write ( std::ostream & os) const

Write the built ELF binary in the stream os given in parameter.

References build(), and LIEF_LOCAL.


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