Skip to content

Commit

Permalink
Resolve #936
Browse files Browse the repository at this point in the history
  • Loading branch information
romainthomas committed Jul 1, 2023
1 parent eee71c9 commit 7057b9d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion api/python/src/ELF/objects/pyParserConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ void create<ParserConfig>(py::module& m) {
.def_readwrite("parse_symbol_versions", &ParserConfig::parse_symbol_versions,
"Whether versioning symbols should be parsed")
.def_readwrite("parse_notes", &ParserConfig::parse_notes,
"Whether ELF notes information should be parsed")
"Whether ELF notes information should be parsed")
.def_readwrite("parse_overlay", &ParserConfig::parse_overlay,
"Whether the overlay data should be parsed")
.def_readwrite("count_mtd", &ParserConfig::count_mtd,
R"delim(
The :class:`~lief.ELF.DYNSYM_COUNT_METHODS` to use for counting the dynamic symbols
Expand Down
1 change: 1 addition & 0 deletions include/LIEF/ELF/ParserConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ struct LIEF_API ParserConfig {
bool parse_static_symbols = true; ///< Whether debug symbols (those from `.symtab`) should be parsed
bool parse_symbol_versions = true; ///< Whether versioning symbols should be parsed
bool parse_notes = true; ///< Whether ELF notes information should be parsed
bool parse_overlay = true; ///< Whether the overlay data should be parsed

/** The method used to count the number of dynamic symbols */
DYNSYM_COUNT_METHODS count_mtd = DYNSYM_COUNT_METHODS::COUNT_AUTO;
Expand Down
4 changes: 3 additions & 1 deletion src/ELF/Parser.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,9 @@ ok_error_t Parser::parse_binary() {
link_symbol_version();
}

parse_overlay();
if (config_.parse_overlay) {
parse_overlay();
}
return ok();
}

Expand Down

0 comments on commit 7057b9d

Please sign in to comment.