LIEF: Library to Instrument Executable Formats
Version 0.17.4
Toggle main menu visibility
Loading...
Searching...
No Matches
install
linux
x86_64
sdk
static
include
LIEF
ELF
ELF/ParserConfig.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_PARSER_CONFIG_H
17
#define LIEF_ELF_PARSER_CONFIG_H
18
#include "
LIEF/visibility.h
"
19
#include "
LIEF/ELF/enums.hpp
"
20
21
namespace
LIEF
{
22
namespace
ELF
{
23
25
struct
LIEF_API
ParserConfig
{
28
enum class
DYNSYM_COUNT
{
29
AUTO = 0,
30
SECTION = 1,
31
HASH = 2,
32
RELOCATIONS = 3,
33
};
34
37
static
ParserConfig
all
() {
38
static
const
ParserConfig
DEFAULT;
39
return
DEFAULT;
40
}
41
42
bool
parse_relocations
=
true
;
43
bool
parse_dyn_symbols
=
true
;
44
bool
parse_symtab_symbols
=
true
;
45
bool
parse_symbol_versions
=
true
;
46
bool
parse_notes
=
true
;
47
bool
parse_overlay
=
true
;
48
50
DYNSYM_COUNT
count_mtd
=
DYNSYM_COUNT::AUTO
;
51
55
uint64_t
page_size
= 0;
56
};
57
58
}
59
}
60
#endif
enums.hpp
LIEF::ELF
Namespace related to the LIEF's ELF module.
Definition
Abstract/Header.hpp:28
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:40
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:55
LIEF::ELF::ParserConfig::parse_dyn_symbols
bool parse_dyn_symbols
Whether dynamic symbols (those from .dynsym) should be parsed.
Definition
ELF/ParserConfig.hpp:43
LIEF::ELF::ParserConfig::parse_notes
bool parse_notes
Whether ELF notes information should be parsed.
Definition
ELF/ParserConfig.hpp:46
LIEF::ELF::ParserConfig::parse_relocations
bool parse_relocations
Whether relocations (including plt-like relocations) should be parsed.
Definition
ELF/ParserConfig.hpp:42
LIEF::ELF::ParserConfig::count_mtd
DYNSYM_COUNT count_mtd
Definition
ELF/ParserConfig.hpp:50
LIEF::ELF::ParserConfig::parse_symtab_symbols
bool parse_symtab_symbols
Whether debug symbols (those from .symtab) should be parsed.
Definition
ELF/ParserConfig.hpp:44
LIEF::ELF::ParserConfig::parse_overlay
bool parse_overlay
Whether the overlay data should be parsed.
Definition
ELF/ParserConfig.hpp:47
LIEF::ELF::ParserConfig::parse_symbol_versions
bool parse_symbol_versions
Whether versioning symbols should be parsed.
Definition
ELF/ParserConfig.hpp:45
LIEF::ELF::ParserConfig::DYNSYM_COUNT
DYNSYM_COUNT
Definition
ELF/ParserConfig.hpp:28
LIEF::ELF::ParserConfig::DYNSYM_COUNT::AUTO
@ AUTO
Definition
ELF/ParserConfig.hpp:29
LIEF::ELF::ParserConfig::all
static ParserConfig all()
This returns a ParserConfig object configured to process all the ELF elements.
Definition
ELF/ParserConfig.hpp:37
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:41
Generated by
1.17.0