17#ifndef LIEF_ELF_BUIDLER_H
18#define LIEF_ELF_BUIDLER_H
40class ObjectFileLayout;
144 void write(const std::
string& filename) const;
150 template<typename ELF_T>
153 template<typename ELF_T>
156 template<typename ELF_T>
159 template<typename ELF_T>
162 template<typename ELF_T>
165 template<typename ELF_T>
168 template<typename ELF_T>
171 template<typename ELF_T>
174 template<typename ELF_T>
177 template<typename ELF_T>
180 template<typename ELF_T>
183 template<typename ELF_T>
186 template<typename ELF_T>
189 template<typename ELF_T>
192 template<typename ELF_T>
195 template<typename ELF_T>
200 template<typename ELF_T>
203 template<typename ELF_T>
208 template<typename ELF_T>
211 template<typename ELF_T>
214 template<typename ELF_T>
217 template<typename ELF_T>
220 template<typename ELF_T>
224 std::set<const
Note*>& notes);
226 template<typename ELF_T>
231 template<class ELF_T>
238 Binary* binary_ =
nullptr;
239 std::unique_ptr<
Layout> layout_;
Class which represents an ELF binary.
Definition ELF/Binary.hpp:59
friend class ObjectFileLayout
Definition ELF/Builder.hpp:49
friend class ExeLayout
Definition ELF/Builder.hpp:51
void build()
Perform the build of the provided ELF binary.
Builder(Binary &binary, const config_t &config)
void write(const std::string &filename) const
Write the built ELF binary in the filename given in parameter.
friend class Layout
Definition ELF/Builder.hpp:50
config_t & config()
Definition ELF/Builder.hpp:136
Builder(Binary &binary)
Definition ELF/Builder.hpp:127
const std::vector< uint8_t > & get_build()
Return the built ELF binary as a byte vector.
Class that represent an Array in the dynamic table. This entry is associated with constructors:
Definition DynamicEntryArray.hpp:35
Class which represents an entry in the dynamic table These entries are located in the ....
Definition DynamicEntry.hpp:37
Class which represents an ELF note. This class can be instantiated using the static Note::create func...
Definition Note.hpp:39
Class that represents an ELF relocation.
Definition ELF/Relocation.hpp:40
Class which represents an ELF Section.
Definition ELF/Section.hpp:48
Opaque structure that is used by LIEF to avoid writing result<void> f(...). Instead,...
Definition errors.hpp:117
Definition iostream.hpp:32
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Namespace related to the LIEF's ELF module.
Definition Abstract/Header.hpp:28
LIEF namespace.
Definition Abstract/Binary.hpp:40
Configuration options to tweak the building process.
Definition ELF/Builder.hpp:55
bool keep_empty_version_requirement
Remove entries in .gnu.version_r if they are not associated with at least one version.
Definition ELF/Builder.hpp:123
bool force_relocate
Force to relocating all the ELF structures that are supported by LIEF (mostly for testing).
Definition ELF/Builder.hpp:115
bool dynamic_section
Rebuild PT_DYNAMIC segment.
Definition ELF/Builder.hpp:63
bool dyn_str
Rebuild DT_STRTAB.
Definition ELF/Builder.hpp:60
bool static_symtab
Rebuild .symtab.
Definition ELF/Builder.hpp:96
bool relr
Rebuild DT_RELR.
Definition ELF/Builder.hpp:87
bool init_array
Rebuild DT_INIT_ARRAY.
Definition ELF/Builder.hpp:72
bool symtab
Rebuild DT_SYMTAB.
Definition ELF/Builder.hpp:108
bool android_rela
Rebuild DT_ANDROID_REL[A].
Definition ELF/Builder.hpp:90
bool sym_versym
Rebuild DT_VERSYM.
Definition ELF/Builder.hpp:105
bool gnu_hash
Rebuild DT_GNU_HASH.
Definition ELF/Builder.hpp:69
bool rela
Rebuild DT_REL[A].
Definition ELF/Builder.hpp:93
bool preinit_array
Rebuild DT_PREINIT_ARRAY.
Definition ELF/Builder.hpp:84
bool sym_verneed
Rebuild DT_VERNEED.
Definition ELF/Builder.hpp:102
bool coredump_notes
Rebuild the Coredump notes.
Definition ELF/Builder.hpp:111
bool fini_array
Rebuild DT_FINI_ARRAY.
Definition ELF/Builder.hpp:66
bool dt_hash
Rebuild DT_HASH.
Definition ELF/Builder.hpp:57
bool interpreter
Rebuild PT_INTERPRETER.
Definition ELF/Builder.hpp:75
bool skip_dynamic
Skip relocating the PT_DYNAMIC segment (only relevant if force_relocate is set.
Definition ELF/Builder.hpp:119
bool notes
Disable note building since it can break the default layout.
Definition ELF/Builder.hpp:81
bool jmprel
Rebuild DT_JMPREL.
Definition ELF/Builder.hpp:78
bool sym_verdef
Rebuild DT_VERDEF.
Definition ELF/Builder.hpp:99
#define LIEF_API
Definition visibility.h:45
#define LIEF_LOCAL
Definition visibility.h:46