LIEF: Library to Instrument Executable Formats
Version 2.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
ELF
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
22
namespace
LIEF::ELF
{
23
25
struct
LIEF_API
ParserConfig
{
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
56
bool
parse_symtab_symbols
=
true
;
57
59
bool
parse_symbol_versions
=
true
;
60
62
bool
parse_notes
=
true
;
63
65
bool
parse_overlay
=
true
;
66
68
DYNSYM_COUNT
count_mtd
=
DYNSYM_COUNT::AUTO
;
69
73
uint64_t
page_size
= 0;
74
};
75
76
}
77
78
#endif
LIEF::ELF
Namespace related to the LIEF's ELF module.
Definition
Abstract/Header.hpp:27
LIEF::ELF::ParserConfig
This structure is used to tweak the ELF Parser (ELF::Parser).
Definition
ELF/ParserConfig.hpp:25
LIEF::ELF::ParserConfig::page_size
uint64_t page_size
Memory page size if the binary uses a non-standard value.
Definition
ELF/ParserConfig.hpp:73
LIEF::ELF::ParserConfig::parse_dyn_symbols
bool parse_dyn_symbols
Whether dynamic symbols (those from .dynsym) should be parsed.
Definition
ELF/ParserConfig.hpp:53
LIEF::ELF::ParserConfig::parse_notes
bool parse_notes
Whether ELF notes information should be parsed.
Definition
ELF/ParserConfig.hpp:62
LIEF::ELF::ParserConfig::parse_relocations
bool parse_relocations
Whether relocations (including plt-like relocations) should be parsed.
Definition
ELF/ParserConfig.hpp:50
LIEF::ELF::ParserConfig::count_mtd
DYNSYM_COUNT count_mtd
The method used to count the number of dynamic symbols.
Definition
ELF/ParserConfig.hpp:68
LIEF::ELF::ParserConfig::parse_symtab_symbols
bool parse_symtab_symbols
Whether debug symbols (those from .symtab) should be parsed.
Definition
ELF/ParserConfig.hpp:56
LIEF::ELF::ParserConfig::parse_overlay
bool parse_overlay
Whether the overlay data should be parsed.
Definition
ELF/ParserConfig.hpp:65
LIEF::ELF::ParserConfig::parse_symbol_versions
bool parse_symbol_versions
Whether versioning symbols should be parsed.
Definition
ELF/ParserConfig.hpp:59
LIEF::ELF::ParserConfig::DYNSYM_COUNT
DYNSYM_COUNT
Methods that can be used by the LIEF::ELF::Parser to count the number of dynamic symbols.
Definition
ELF/ParserConfig.hpp:28
LIEF::ELF::ParserConfig::DYNSYM_COUNT::AUTO
@ AUTO
Automatic detection.
Definition
ELF/ParserConfig.hpp:30
LIEF::ELF::ParserConfig::all
static ParserConfig all()
This returns a ParserConfig object configured to process all the ELF elements.
Definition
ELF/ParserConfig.hpp:44
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:44
Generated by
1.19.0