LIEF: Library to Instrument Executable Formats Version 2.0.0
Loading...
Searching...
No Matches
ELF/ParserConfig.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2026 R. Thomas
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15#ifndef LIEF_ELF_PARSER_CONFIG_H
16#define LIEF_ELF_PARSER_CONFIG_H
17#include "LIEF/visibility.h"
18
19#include <cstdint>
20
21
22namespace LIEF::ELF {
23
28 enum class DYNSYM_COUNT {
30 AUTO = 0,
31
33 SECTION,
34
36 HASH,
37
39 RELOCATIONS,
40 };
41
44 static ParserConfig all() {
45 static const ParserConfig DEFAULT;
46 return DEFAULT;
47 }
48
50 bool parse_relocations = true;
51
53 bool parse_dyn_symbols = true;
54
57
60
62 bool parse_notes = true;
63
65 bool parse_overlay = true;
66
69
73 uint64_t page_size = 0;
74};
75
76}
77
78#endif
Namespace related to the LIEF's ELF module.
Definition Abstract/Header.hpp:27
This structure is used to tweak the ELF Parser (ELF::Parser).
Definition ELF/ParserConfig.hpp:25
uint64_t page_size
Memory page size if the binary uses a non-standard value.
Definition ELF/ParserConfig.hpp:73
bool parse_dyn_symbols
Whether dynamic symbols (those from .dynsym) should be parsed.
Definition ELF/ParserConfig.hpp:53
bool parse_notes
Whether ELF notes information should be parsed.
Definition ELF/ParserConfig.hpp:62
bool parse_relocations
Whether relocations (including plt-like relocations) should be parsed.
Definition ELF/ParserConfig.hpp:50
DYNSYM_COUNT count_mtd
The method used to count the number of dynamic symbols.
Definition ELF/ParserConfig.hpp:68
bool parse_symtab_symbols
Whether debug symbols (those from .symtab) should be parsed.
Definition ELF/ParserConfig.hpp:56
bool parse_overlay
Whether the overlay data should be parsed.
Definition ELF/ParserConfig.hpp:65
bool parse_symbol_versions
Whether versioning symbols should be parsed.
Definition ELF/ParserConfig.hpp:59
DYNSYM_COUNT
Methods that can be used by the LIEF::ELF::Parser to count the number of dynamic symbols.
Definition ELF/ParserConfig.hpp:28
@ AUTO
Automatic detection.
Definition ELF/ParserConfig.hpp:30
static ParserConfig all()
This returns a ParserConfig object configured to process all the ELF elements.
Definition ELF/ParserConfig.hpp:44
#define LIEF_API
Definition visibility.h:44