LIEF: Library to Instrument Executable Formats Version 1.0.0
Loading...
Searching...
No Matches
ELF/ParserConfig.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2026 R. Thomas
2 * Copyright 2017 - 2026 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_PARSER_CONFIG_H
17#define LIEF_ELF_PARSER_CONFIG_H
18#include "LIEF/visibility.h"
19
20#include <cstdint>
21
22namespace LIEF {
23namespace ELF {
24
29 enum class DYNSYM_COUNT {
31 AUTO = 0,
32
34 SECTION,
35
37 HASH,
38
40 RELOCATIONS,
41 };
42
45 static ParserConfig all() {
46 static const ParserConfig DEFAULT;
47 return DEFAULT;
48 }
49
51 bool parse_relocations = true;
52
54 bool parse_dyn_symbols = true;
55
58
61
63 bool parse_notes = true;
64
66 bool parse_overlay = true;
67
70
74 uint64_t page_size = 0;
75};
76
77}
78}
79#endif
Namespace related to the LIEF's ELF module.
Definition Abstract/Header.hpp:28
LIEF namespace.
Definition Abstract/Binary.hpp:40
This structure is used to tweak the ELF Parser (ELF::Parser).
Definition ELF/ParserConfig.hpp:26
uint64_t page_size
Memory page size if the binary uses a non-standard value.
Definition ELF/ParserConfig.hpp:74
bool parse_dyn_symbols
Whether dynamic symbols (those from .dynsym) should be parsed.
Definition ELF/ParserConfig.hpp:54
bool parse_notes
Whether ELF notes information should be parsed.
Definition ELF/ParserConfig.hpp:63
bool parse_relocations
Whether relocations (including plt-like relocations) should be parsed.
Definition ELF/ParserConfig.hpp:51
DYNSYM_COUNT count_mtd
The method used to count the number of dynamic symbols.
Definition ELF/ParserConfig.hpp:69
bool parse_symtab_symbols
Whether debug symbols (those from .symtab) should be parsed.
Definition ELF/ParserConfig.hpp:57
bool parse_overlay
Whether the overlay data should be parsed.
Definition ELF/ParserConfig.hpp:66
bool parse_symbol_versions
Whether versioning symbols should be parsed.
Definition ELF/ParserConfig.hpp:60
DYNSYM_COUNT
Methods that can be used by the LIEF::ELF::Parser to count the number of dynamic symbols.
Definition ELF/ParserConfig.hpp:29
@ AUTO
Automatic detection.
Definition ELF/ParserConfig.hpp:31
static ParserConfig all()
This returns a ParserConfig object configured to process all the ELF elements.
Definition ELF/ParserConfig.hpp:45
#define LIEF_API
Definition visibility.h:45