17#ifndef LIEF_ELF_BUIDLER_H
18#define LIEF_ELF_BUIDLER_H
36class DynamicEntryArray;
40class ObjectFileLayout;
49 friend class ObjectFileLayout;
51 friend class ExeLayout;
58 bool dynamic_section =
true;
59 bool fini_array =
true;
61 bool init_array =
true;
62 bool interpreter =
true;
65 bool preinit_array =
true;
67 bool android_rela =
true;
69 bool static_symtab =
true;
70 bool sym_verdef =
true;
71 bool sym_verneed =
true;
72 bool sym_versym =
true;
74 bool coredump_notes =
true;
75 bool force_relocate =
false;
100 void write(
const std::string& filename)
const;
106 template<
typename ELF_T>
109 template<
typename ELF_T>
112 template<
typename ELF_T>
115 template<
typename ELF_T>
118 template<
typename ELF_T>
121 template<
typename ELF_T>
124 template<
typename ELF_T>
127 template<
typename ELF_T>
130 template<
typename ELF_T>
133 template<
typename ELF_T>
136 template<
typename ELF_T>
139 template<
typename ELF_T>
142 template<
typename ELF_T>
145 template<
typename ELF_T>
148 template<
typename ELF_T>
151 template<
typename ELF_T>
154 uint32_t sort_dynamic_symbols();
156 template<
typename ELF_T>
159 template<
typename ELF_T>
164 template<
typename ELF_T>
167 template<
typename ELF_T>
170 template<
typename ELF_T>
173 template<
typename ELF_T>
176 template<
typename ELF_T>
179 ok_error_t update_note_section(
const Note& note, std::set<const Note*>& notes);
181 template<
typename ELF_T>
184 bool should_swap()
const;
186 template<
class ELF_T>
189 bool should_build_notes()
const;
194 std::unique_ptr<Layout> layout_;
Class which represents an ELF binary.
Definition ELF/Binary.hpp:59
Class which takes an ELF::Binary object and reconstructs a valid binary.
Definition ELF/Builder.hpp:48
void build()
Perform the build of the provided ELF binary.
void write(const std::string &filename) const
Write the built ELF binary in the filename given in parameter.
Builder & set_config(config_t conf)
Tweak the ELF builder with the provided config parameter.
Definition ELF/Builder.hpp:87
void write(std::ostream &os) const
Write the built ELF binary in the stream os given in parameter.
config_t & config()
Definition ELF/Builder.hpp:92
const std::vector< uint8_t > & get_build()
Return the built ELF binary as a byte vector.
Class which represents an ELF note. This class can be instantiated using the static Note::create func...
Definition Note.hpp:39
Definition iostream.hpp:29
LIEF namespace.
Definition Abstract/Binary.hpp:32
result< ok_t > ok_error_t
Opaque structure that is used by LIEF to avoid writing result<void> f(...). Instead,...
Definition errors.hpp:108
Configuration options to tweak the building process.
Definition ELF/Builder.hpp:55
#define LIEF_API
Definition visibility.h:41