LIEF: Library to Instrument Executable Formats Version 0.15.0
|
Class that is used to rebuild a raw PE binary from a PE::Binary object. More...
#include <Builder.hpp>
Public Member Functions | |
Builder (Binary &binary) | |
ok_error_t | build () |
Perform the build process. | |
Builder & | build_imports (bool flag=true) |
Rebuild the import table in new section. | |
Builder & | patch_imports (bool flag=true) |
Patch the original import table in order to redirect functions to the new import table. | |
Builder & | build_relocations (bool flag=true) |
Rebuild the relocation table in another section. | |
Builder & | build_tls (bool flag=true) |
Rebuild TLS object in another section. | |
Builder & | build_resources (bool flag) |
Rebuid the resources in another section. | |
Builder & | build_overlay (bool flag) |
Rebuild the binary's overlay. | |
Builder & | build_dos_stub (bool flag) |
Rebuild the DOS stub content. | |
const std::vector< uint8_t > & | get_build () |
Return the build result. | |
void | write (const std::string &filename) const |
Write the build result into the output file. | |
void | write (std::ostream &os) const |
Write the build result into the os stream. | |
ok_error_t | build (const DosHeader &dos_header) |
ok_error_t | build (const Header &bHeader) |
ok_error_t | build (const OptionalHeader &optional_header) |
ok_error_t | build (const DataDirectory &data_directory) |
ok_error_t | build (const Section §ion) |
Static Public Member Functions | |
template<typename PE_T > | |
static std::vector< uint8_t > | build_jmp (uint64_t from, uint64_t address) |
Construct a jmp [address] @ from . | |
template<typename PE_T > | |
static std::vector< uint8_t > | build_jmp_hook (uint64_t from, uint64_t address) |
Construct a jmp far address @ from . | |
Class that is used to rebuild a raw PE binary from a PE::Binary object.
|
static |
Construct a jmp [address] @ from
.
It is used when patching import table
|
static |
Construct a jmp far address @ from
.
It is used for hooking
Builder & LIEF::PE::Builder::patch_imports | ( | bool | flag = true | ) |
Patch the original import table in order to redirect functions to the new import table.
This setting should be used with LIEF::PE::Builder::build_imports set to true