LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
ELF/Section.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2025 R. Thomas
2 * Copyright 2017 - 2025 Quarkslab
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef LIEF_ELF_SECTION_H
17#define LIEF_ELF_SECTION_H
18
19#include <string>
20#include <ostream>
21#include <vector>
22#include <memory>
23
24#include "LIEF/utils.hpp"
25#include "LIEF/visibility.h"
27
28#include "LIEF/ELF/enums.hpp"
29#include "LIEF/iterators.hpp"
30
31namespace LIEF {
32class SpanStream;
33namespace ELF {
34
35namespace DataHandler {
36class Handler;
37}
38
39class Segment;
40class Parser;
41class Binary;
42class Builder;
43class ExeLayout;
44class ObjectFileLayout;
45
46
49 friend class Parser;
50 friend class Binary;
51 friend class Builder;
52 friend class ExeLayout;
53 friend class ObjectFileLayout;
54
55 public:
56 using segments_t = std::vector<Segment*>;
59
60 static constexpr uint32_t MAX_SECTION_SIZE = 2_GB;
61
62 enum class TYPE : uint64_t {
65 SYMTAB = 2,
66 STRTAB = 3,
67 RELA = 4,
68 HASH = 5,
69 DYNAMIC = 6,
70 NOTE = 7,
71 NOBITS = 8,
72 REL = 9,
73 SHLIB = 10,
74 DYNSYM = 11,
78 GROUP = 17,
80 RELR = 19,
81
82 ANDROID_REL = 0x60000001,
83 ANDROID_RELA = 0x60000002,
84 LLVM_ADDRSIG = 0x6fff4c03,
85 ANDROID_RELR = 0x6fffff00,
86 GNU_ATTRIBUTES = 0x6ffffff5,
87 GNU_HASH = 0x6ffffff6,
88 GNU_VERDEF = 0x6ffffffd,
89 GNU_VERNEED = 0x6ffffffe,
90 GNU_VERSYM = 0x6fffffff,
91
93 _ARM_ID_ = 1LLU, _HEX_ID_ = 2LLU, _X86_64_ID_ = 2LLU,
94 _MIPS_ID_ = 3LLU, _RISCV_ID_ = 4LLU,
95
96 ARM_EXIDX = 0x70000001U + (_ARM_ID_ << _ID_SHIFT_),
97 ARM_PREEMPTMAP = 0x70000002U + (_ARM_ID_ << _ID_SHIFT_),
98 ARM_ATTRIBUTES = 0x70000003U + (_ARM_ID_ << _ID_SHIFT_),
99 ARM_DEBUGOVERLAY = 0x70000004U + (_ARM_ID_ << _ID_SHIFT_),
101
102 HEX_ORDERED = 0x70000000 + (_HEX_ID_ << _ID_SHIFT_),
103
104 /* this section based on their sizes */
106
107 MIPS_LIBLIST = 0x70000000 + (_MIPS_ID_ << _ID_SHIFT_),
108 MIPS_MSYM = 0x70000001 + (_MIPS_ID_ << _ID_SHIFT_),
109 MIPS_CONFLICT = 0x70000002 + (_MIPS_ID_ << _ID_SHIFT_),
110 MIPS_GPTAB = 0x70000003 + (_MIPS_ID_ << _ID_SHIFT_),
111 MIPS_UCODE = 0x70000004 + (_MIPS_ID_ << _ID_SHIFT_),
112 MIPS_DEBUG = 0x70000005 + (_MIPS_ID_ << _ID_SHIFT_),
113 MIPS_REGINFO = 0x70000006 + (_MIPS_ID_ << _ID_SHIFT_),
114 MIPS_PACKAGE = 0x70000007 + (_MIPS_ID_ << _ID_SHIFT_),
115 MIPS_PACKSYM = 0x70000008 + (_MIPS_ID_ << _ID_SHIFT_),
116 MIPS_RELD = 0x70000009 + (_MIPS_ID_ << _ID_SHIFT_),
117 MIPS_IFACE = 0x7000000b + (_MIPS_ID_ << _ID_SHIFT_),
118 MIPS_CONTENT = 0x7000000c + (_MIPS_ID_ << _ID_SHIFT_),
119 MIPS_OPTIONS = 0x7000000d + (_MIPS_ID_ << _ID_SHIFT_),
120 MIPS_SHDR = 0x70000010 + (_MIPS_ID_ << _ID_SHIFT_),
121 MIPS_FDESC = 0x70000011 + (_MIPS_ID_ << _ID_SHIFT_),
122 MIPS_EXTSYM = 0x70000012 + (_MIPS_ID_ << _ID_SHIFT_),
123 MIPS_DENSE = 0x70000013 + (_MIPS_ID_ << _ID_SHIFT_),
124 MIPS_PDESC = 0x70000014 + (_MIPS_ID_ << _ID_SHIFT_),
125 MIPS_LOCSYM = 0x70000015 + (_MIPS_ID_ << _ID_SHIFT_),
126 MIPS_AUXSYM = 0x70000016 + (_MIPS_ID_ << _ID_SHIFT_),
127 MIPS_OPTSYM = 0x70000017 + (_MIPS_ID_ << _ID_SHIFT_),
128 MIPS_LOCSTR = 0x70000018 + (_MIPS_ID_ << _ID_SHIFT_),
129 MIPS_LINE = 0x70000019 + (_MIPS_ID_ << _ID_SHIFT_),
130 MIPS_RFDESC = 0x7000001a + (_MIPS_ID_ << _ID_SHIFT_),
131 MIPS_DELTASYM = 0x7000001b + (_MIPS_ID_ << _ID_SHIFT_),
134 MIPS_DWARF = 0x7000001e + (_MIPS_ID_ << _ID_SHIFT_),
137 MIPS_EVENTS = 0x70000021 + (_MIPS_ID_ << _ID_SHIFT_),
139 MIPS_PIXIE = 0x70000023 + (_MIPS_ID_ << _ID_SHIFT_),
140 MIPS_XLATE = 0x70000024 + (_MIPS_ID_ << _ID_SHIFT_),
142 MIPS_WHIRL = 0x70000026 + (_MIPS_ID_ << _ID_SHIFT_),
146 MIPS_ABIFLAGS = 0x7000002a + (_MIPS_ID_ << _ID_SHIFT_),
147 MIPS_XHASH = 0x7000002b + (_MIPS_ID_ << _ID_SHIFT_),
148
150 };
151
152 enum class FLAGS : uint64_t {
153 NONE = 0x000000000,
154 WRITE = 0x000000001,
155 ALLOC = 0x000000002,
156 EXECINSTR = 0x000000004,
157 MERGE = 0x000000010,
158 STRINGS = 0x000000020,
159 INFO_LINK = 0x000000040,
160 LINK_ORDER = 0x000000080,
161 OS_NONCONFORMING = 0x000000100,
162 GROUP = 0x000000200,
163 TLS = 0x000000400,
164 COMPRESSED = 0x000000800,
165 GNU_RETAIN = 0x000200000,
166 EXCLUDE = 0x080000000,
167
169 _XCORE_ID_ = 1LLU, _HEX_ID_ = 3LLU, _X86_64_ID_ = 2LLU,
170 _MIPS_ID_ = 4LLU, _ARM_ID_ = 5LLU,
171
174
175 X86_64_LARGE = 0x010000000 + (_X86_64_ID_ << _ID_SHIFT_),
176
177 HEX_GPREL = 0x010000000 + (_HEX_ID_ << _ID_SHIFT_),
178
179 MIPS_NODUPES = 0x001000000 + (_MIPS_ID_ << _ID_SHIFT_),
180 MIPS_NAMES = 0x002000000 + (_MIPS_ID_ << _ID_SHIFT_),
181 MIPS_LOCAL = 0x004000000 + (_MIPS_ID_ << _ID_SHIFT_),
182 MIPS_NOSTRIP = 0x008000000 + (_MIPS_ID_ << _ID_SHIFT_),
183 MIPS_GPREL = 0x010000000 + (_MIPS_ID_ << _ID_SHIFT_),
184 MIPS_MERGE = 0x020000000 + (_MIPS_ID_ << _ID_SHIFT_),
185 MIPS_ADDR = 0x040000000 + (_MIPS_ID_ << _ID_SHIFT_),
186 MIPS_STRING = 0x080000000 + (_MIPS_ID_ << _ID_SHIFT_),
187
188 ARM_PURECODE = 0x020000000 + (_ARM_ID_ << _ID_SHIFT_),
189 };
190
191 static constexpr uint64_t FLAG_MASK = (uint64_t(1) << uint8_t(FLAGS::_ID_SHIFT_)) - 1;
192 static constexpr uint64_t TYPE_MASK = (uint64_t(1) << uint8_t(TYPE::_ID_SHIFT_)) - 1;
193
194 static TYPE type_from(uint32_t value, ARCH arch);
195 static uint32_t to_value(TYPE type) {
196 return static_cast<uint64_t>(type) & TYPE_MASK;
197 }
198
199 Section(const std::string& name, TYPE type = TYPE::PROGBITS) :
200 LIEF::Section(name),
201 type_{type}
202 {}
203
204 Section() = default;
205 ~Section() override = default;
206
208 swap(other);
209 return *this;
210 }
211 Section(const Section& other);
212 void swap(Section& other) noexcept;
213
214 TYPE type() const {
215 return type_;
216 }
217
219 span<const uint8_t> content() const override;
220
222 void content(const std::vector<uint8_t>& data) override;
223
224 void content(std::vector<uint8_t>&& data);
225
227 uint64_t flags() const {
228 return flags_;
229 }
230
232 bool has(FLAGS flag) const;
233
235 bool has(const Segment& segment) const;
236
238 std::vector<FLAGS> flags_list() const;
239
240 uint64_t size() const override {
241 return size_;
242 }
243
244 void size(uint64_t size) override;
245
246 void offset(uint64_t offset) override;
247
248 uint64_t offset() const override {
249 return offset_;
250 }
251
253 uint64_t file_offset() const {
254 return this->offset();
255 }
256
261 uint64_t original_size() const {
262 return original_size_;
263 }
264
266 uint64_t alignment() const {
267 return address_align_;
268 }
269
272 uint64_t information() const {
273 return info_;
274 }
275
282 uint64_t entry_size() const {
283 return entry_size_;
284 }
285
287 uint32_t link() const {
288 return link_;
289 }
290
292 Section& clear(uint8_t value = 0);
293
295 void add(FLAGS flag);
296
298 void remove(FLAGS flag);
299
300 void type(TYPE type) {
301 type_ = type;
302 }
303
304 void flags(uint64_t flags) {
305 flags_ = flags;
306 }
307
308 void clear_flags() {
309 flags_ = 0;
310 }
311
312 void file_offset(uint64_t offset) {
313 this->offset(offset);
314 }
315
316 void link(uint32_t link) {
317 link_ = link;
318 }
319
320 void information(uint32_t info) {
321 info_ = info;
322 }
323
324 void alignment(uint64_t alignment) {
325 address_align_ = alignment;
326 }
327
328 void entry_size(uint64_t entry_size) {
329 entry_size_ = entry_size;
330 }
331
333 return segments_;
334 }
335
337 return segments_;
338 }
339
341 is_frame_ = true;
342 return *this;
343 }
344
345 bool is_frame() const {
346 return is_frame_;
347 }
348
349 void accept(Visitor& visitor) const override;
350
352 add(c);
353 return *this;
354 }
355
357 remove(c);
358 return *this;
359 }
360
362 std::unique_ptr<SpanStream> stream() const;
363
364 LIEF_API friend std::ostream& operator<<(std::ostream& os, const Section& section);
365
366 private:
367 template<class T>
368 LIEF_LOCAL Section(const T& header, ARCH arch);
369
370 LIEF_LOCAL span<uint8_t> writable_content();
371 ARCH arch_ = ARCH::NONE;
372 TYPE type_ = TYPE::SHT_NULL_;
373 uint64_t flags_ = 0;
374 uint64_t original_size_ = 0;
375 uint32_t link_ = 0;
376 uint32_t info_ = 0;
377 uint64_t address_align_ = 0;
378 uint64_t entry_size_ = 0;
379 segments_t segments_;
380 bool is_frame_ = false;
381 DataHandler::Handler* datahandler_ = nullptr;
382 std::vector<uint8_t> content_c_;
383};
384
387
388}
389}
390
392
393#endif
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
Class which parses and transforms an ELF file into a ELF::Binary object.
Definition ELF/Parser.hpp:45
friend class ObjectFileLayout
Definition ELF/Section.hpp:53
void size(uint64_t size) override
Change the section size.
static TYPE type_from(uint32_t value, ARCH arch)
ref_iterator< segments_t & > it_segments
Definition ELF/Section.hpp:57
span< const uint8_t > content() const override
Section's content.
it_segments segments()
Definition ELF/Section.hpp:332
uint64_t original_size() const
Original size of the section's data.
Definition ELF/Section.hpp:261
friend class ExeLayout
Definition ELF/Section.hpp:52
Section & operator+=(FLAGS c)
Definition ELF/Section.hpp:351
void clear_flags()
Definition ELF/Section.hpp:308
uint64_t flags() const
Section flags.
Definition ELF/Section.hpp:227
std::vector< Segment * > segments_t
Definition ELF/Section.hpp:56
static constexpr uint64_t TYPE_MASK
Definition ELF/Section.hpp:192
Section & as_frame()
Definition ELF/Section.hpp:340
void offset(uint64_t offset) override
static constexpr uint64_t FLAG_MASK
Definition ELF/Section.hpp:191
friend std::ostream & operator<<(std::ostream &os, const Section &section)
void remove(FLAGS flag)
Remove the given ELF_SECTION_FLAGS.
std::vector< FLAGS > flags_list() const
Return section flags as a std::set.
bool is_frame() const
Definition ELF/Section.hpp:345
uint64_t file_offset() const
Definition ELF/Section.hpp:253
~Section() override=default
void alignment(uint64_t alignment)
Definition ELF/Section.hpp:324
void information(uint32_t info)
Definition ELF/Section.hpp:320
static uint32_t to_value(TYPE type)
Definition ELF/Section.hpp:195
std::unique_ptr< SpanStream > stream() const
Return a stream over the content of this section.
Section(const Section &other)
const_ref_iterator< const segments_t & > it_const_segments
Definition ELF/Section.hpp:58
TYPE type() const
Definition ELF/Section.hpp:214
friend class Builder
Definition ELF/Section.hpp:51
TYPE
Definition ELF/Section.hpp:62
@ SYMTAB_SHNDX
Definition ELF/Section.hpp:79
@ MIPS_DENSE
Definition ELF/Section.hpp:123
@ MIPS_AUXSYM
Definition ELF/Section.hpp:126
@ MIPS_XHASH
Definition ELF/Section.hpp:147
@ LLVM_ADDRSIG
Definition ELF/Section.hpp:84
@ SYMTAB
Definition ELF/Section.hpp:65
@ DYNAMIC
Definition ELF/Section.hpp:69
@ NOTE
Definition ELF/Section.hpp:70
@ MIPS_LIBLIST
Definition ELF/Section.hpp:107
@ MIPS_EH_REGION
Definition ELF/Section.hpp:143
@ MIPS_OPTSYM
Definition ELF/Section.hpp:127
@ ANDROID_RELR
Definition ELF/Section.hpp:85
@ MIPS_DWARF
Definition ELF/Section.hpp:134
@ ARM_ATTRIBUTES
Definition ELF/Section.hpp:98
@ MIPS_XLATE
Definition ELF/Section.hpp:140
@ MIPS_LINE
Definition ELF/Section.hpp:129
@ GNU_VERNEED
Definition ELF/Section.hpp:89
@ MIPS_LOCSTR
Definition ELF/Section.hpp:128
@ MIPS_CONTENT
Definition ELF/Section.hpp:118
@ MIPS_DELTAINST
Definition ELF/Section.hpp:132
@ MIPS_XLATE_OLD
Definition ELF/Section.hpp:144
@ NOBITS
Definition ELF/Section.hpp:71
@ MIPS_IFACE
Definition ELF/Section.hpp:117
@ MIPS_PDESC
Definition ELF/Section.hpp:124
@ _ID_SHIFT_
Definition ELF/Section.hpp:92
@ GNU_ATTRIBUTES
Definition ELF/Section.hpp:86
@ MIPS_DELTACLASS
Definition ELF/Section.hpp:133
@ SHLIB
Definition ELF/Section.hpp:73
@ MIPS_RFDESC
Definition ELF/Section.hpp:130
@ PREINIT_ARRAY
Definition ELF/Section.hpp:77
@ _HEX_ID_
Definition ELF/Section.hpp:93
@ HASH
Definition ELF/Section.hpp:68
@ MIPS_GPTAB
Definition ELF/Section.hpp:110
@ MIPS_PACKAGE
Definition ELF/Section.hpp:114
@ RELR
Definition ELF/Section.hpp:80
@ MIPS_LOCSYM
Definition ELF/Section.hpp:125
@ _MIPS_ID_
Definition ELF/Section.hpp:94
@ MIPS_EVENTS
Definition ELF/Section.hpp:137
@ _RISCV_ID_
Definition ELF/Section.hpp:94
@ GROUP
Definition ELF/Section.hpp:78
@ STRTAB
Definition ELF/Section.hpp:66
@ ARM_EXIDX
Definition ELF/Section.hpp:96
@ MIPS_FDESC
Definition ELF/Section.hpp:121
@ MIPS_OPTIONS
Definition ELF/Section.hpp:119
@ MIPS_PIXIE
Definition ELF/Section.hpp:139
@ ANDROID_REL
Definition ELF/Section.hpp:82
@ INIT_ARRAY
Definition ELF/Section.hpp:75
@ MIPS_DELTADECL
Definition ELF/Section.hpp:135
@ ARM_OVERLAYSECTION
Definition ELF/Section.hpp:100
@ MIPS_PDR_EXCEPTION
Definition ELF/Section.hpp:145
@ MIPS_RELD
Definition ELF/Section.hpp:116
@ GNU_VERDEF
Definition ELF/Section.hpp:88
@ MIPS_REGINFO
Definition ELF/Section.hpp:113
@ MIPS_CONFLICT
Definition ELF/Section.hpp:109
@ MIPS_WHIRL
Definition ELF/Section.hpp:142
@ RISCV_ATTRIBUTES
Definition ELF/Section.hpp:149
@ DYNSYM
Definition ELF/Section.hpp:74
@ MIPS_DEBUG
Definition ELF/Section.hpp:112
@ HEX_ORDERED
Definition ELF/Section.hpp:102
@ MIPS_DELTASYM
Definition ELF/Section.hpp:131
@ MIPS_EXTSYM
Definition ELF/Section.hpp:122
@ ANDROID_RELA
Definition ELF/Section.hpp:83
@ ARM_DEBUGOVERLAY
Definition ELF/Section.hpp:99
@ MIPS_MSYM
Definition ELF/Section.hpp:108
@ RELA
Definition ELF/Section.hpp:67
@ MIPS_XLATE_DEBUG
Definition ELF/Section.hpp:141
@ MIPS_ABIFLAGS
Definition ELF/Section.hpp:146
@ SHT_NULL_
Definition ELF/Section.hpp:63
@ FINI_ARRAY
Definition ELF/Section.hpp:76
@ PROGBITS
Definition ELF/Section.hpp:64
@ MIPS_PACKSYM
Definition ELF/Section.hpp:115
@ _X86_64_ID_
Definition ELF/Section.hpp:93
@ ARM_PREEMPTMAP
Definition ELF/Section.hpp:97
@ _ARM_ID_
Definition ELF/Section.hpp:93
@ GNU_VERSYM
Definition ELF/Section.hpp:90
@ MIPS_SHDR
Definition ELF/Section.hpp:120
@ REL
Definition ELF/Section.hpp:72
@ MIPS_UCODE
Definition ELF/Section.hpp:111
@ GNU_HASH
Definition ELF/Section.hpp:87
@ X86_64_UNWIND
Definition ELF/Section.hpp:105
@ MIPS_SYMBOL_LIB
Definition ELF/Section.hpp:136
@ MIPS_TRANSLATE
Definition ELF/Section.hpp:138
Section & operator-=(FLAGS c)
Definition ELF/Section.hpp:356
void content(std::vector< uint8_t > &&data)
uint32_t link() const
Index to another section.
Definition ELF/Section.hpp:287
uint64_t size() const override
section's size (size in the binary, not the virtual size)
Definition ELF/Section.hpp:240
friend class Binary
Definition ELF/Section.hpp:50
void content(const std::vector< uint8_t > &data) override
Set section content.
Section & clear(uint8_t value=0)
Clear the content of the section with the given value.
void accept(Visitor &visitor) const override
void swap(Section &other) noexcept
bool has(const Segment &segment) const
True if the section is wrapped by the given Segment
void entry_size(uint64_t entry_size)
Definition ELF/Section.hpp:328
friend class Parser
Definition ELF/Section.hpp:49
Section(const std::string &name, TYPE type=TYPE::PROGBITS)
Definition ELF/Section.hpp:199
FLAGS
Definition ELF/Section.hpp:152
@ MIPS_STRING
Definition ELF/Section.hpp:186
@ TLS
Definition ELF/Section.hpp:163
@ OS_NONCONFORMING
Definition ELF/Section.hpp:161
@ MIPS_ADDR
Definition ELF/Section.hpp:185
@ EXECINSTR
Definition ELF/Section.hpp:156
@ X86_64_LARGE
Definition ELF/Section.hpp:175
@ INFO_LINK
Definition ELF/Section.hpp:159
@ LINK_ORDER
Definition ELF/Section.hpp:160
@ HEX_GPREL
Definition ELF/Section.hpp:177
@ _ID_SHIFT_
Definition ELF/Section.hpp:168
@ MIPS_GPREL
Definition ELF/Section.hpp:183
@ EXCLUDE
Definition ELF/Section.hpp:166
@ MIPS_LOCAL
Definition ELF/Section.hpp:181
@ ARM_PURECODE
Definition ELF/Section.hpp:188
@ XCORE_SHF_DP_SECTION
Definition ELF/Section.hpp:172
@ STRINGS
Definition ELF/Section.hpp:158
@ COMPRESSED
Definition ELF/Section.hpp:164
@ _XCORE_ID_
Definition ELF/Section.hpp:169
@ ALLOC
Definition ELF/Section.hpp:155
@ MIPS_NAMES
Definition ELF/Section.hpp:180
@ MIPS_NOSTRIP
Definition ELF/Section.hpp:182
@ MERGE
Definition ELF/Section.hpp:157
@ XCORE_SHF_CP_SECTION
Definition ELF/Section.hpp:173
@ NONE
Definition ELF/Section.hpp:153
@ MIPS_MERGE
Definition ELF/Section.hpp:184
@ WRITE
Definition ELF/Section.hpp:154
@ GNU_RETAIN
Definition ELF/Section.hpp:165
@ MIPS_NODUPES
Definition ELF/Section.hpp:179
void type(TYPE type)
Definition ELF/Section.hpp:300
uint64_t information() const
Section information. The meaning of this value depends on the section's type.
Definition ELF/Section.hpp:272
uint64_t offset() const override
Offset in the binary.
Definition ELF/Section.hpp:248
static constexpr uint32_t MAX_SECTION_SIZE
Definition ELF/Section.hpp:60
void link(uint32_t link)
Definition ELF/Section.hpp:316
void add(FLAGS flag)
Add the given ELF_SECTION_FLAGS.
Section & operator=(Section other)
Definition ELF/Section.hpp:207
uint64_t alignment() const
Section file alignment.
Definition ELF/Section.hpp:266
it_const_segments segments() const
Definition ELF/Section.hpp:336
bool has(FLAGS flag) const
True if the section has the given flag
uint64_t entry_size() const
This function returns the size of an element in the case of a section that contains an array.
Definition ELF/Section.hpp:282
void file_offset(uint64_t offset)
Definition ELF/Section.hpp:312
void flags(uint64_t flags)
Definition ELF/Section.hpp:304
Class which represents the ELF segments.
Definition Segment.hpp:48
Class which represents an abstracted section.
Definition Abstract/Section.hpp:29
virtual std::string name() const
section's name
Definition Abstract/Section.hpp:44
Definition SpanStream.hpp:32
Definition Visitor.hpp:210
Iterator which returns reference on container's values.
Definition iterators.hpp:46
#define ENABLE_BITMASK_OPERATORS(X)
Definition enums.hpp:24
Definition ELF/Binary.hpp:38
Namespace related to the LIEF's ELF module.
Definition Abstract/Header.hpp:28
const char * to_string(DynamicEntry::TAG e)
ARCH
Definition ELF/enums.hpp:30
@ NONE
Definition ELF/enums.hpp:31
LIEF namespace.
Definition Abstract/Binary.hpp:40
tcb::span< ElementType, Extent > span
Definition span.hpp:22
ref_iterator< CT, U, typename decay_t< CT >::const_iterator > const_ref_iterator
Iterator which return const ref on container's values.
Definition iterators.hpp:257
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42