Primary class for parsing ELF executables, shared objects, or core dumps. Inherits from ExecutableParser.
More...
#include <elf_parser.hpp>
|
| std::unique_ptr< LIEF::ELF::Binary > | parse_general_data (std::unique_ptr< LIEF::ELF::Binary > elf) |
| |
| std::unique_ptr< LIEF::ELF::Binary > | parse_segments (std::unique_ptr< LIEF::ELF::Binary > elf) |
| |
Primary class for parsing ELF executables, shared objects, or core dumps. Inherits from ExecutableParser.
◆ ElfParser()
| arion::ElfParser::ElfParser |
( |
std::weak_ptr< Arion > |
arion, |
|
|
std::vector< std::string > |
args |
|
) |
| |
|
inline |
Builder for ElfParser instances.
- Parameters
-
| [in] | arion | Weak pointer to the main Arion instance. |
| [in] | args | Vector of command-line arguments, where the first element is the target file path. |
- Exceptions
-
◆ parse_general_data()
| std::unique_ptr< LIEF::ELF::Binary > arion::ElfParser::parse_general_data |
( |
std::unique_ptr< LIEF::ELF::Binary > |
elf | ) |
|
|
private |
Parses general ELF header data (magic, architecture, entry point, file type).
- Parameters
-
| [in] | elf | The unique pointer to the LIEF ELF Binary representation. |
- Returns
- The unique pointer to the LIEF ELF Binary.
◆ parse_segments()
| std::unique_ptr< LIEF::ELF::Binary > arion::ElfParser::parse_segments |
( |
std::unique_ptr< LIEF::ELF::Binary > |
elf | ) |
|
|
private |
Parses the loadable segments (Program Headers of type PT_LOAD) and populates the segment list in attributes.
- Parameters
-
| [in] | elf | The unique pointer to the LIEF ELF Binary representation. |
- Returns
- The unique pointer to the LIEF ELF Binary.
◆ process()
| void arion::ElfParser::process |
( |
| ) |
|
|
virtual |
Main method to process and parse the entire ELF file, including loading, segment parsing, and core dump analysis.
Implements arion::ExecutableParser.
◆ coredump_parser
Instance of the core dump parser used if the file type is CORE.
The documentation for this class was generated from the following file:
- /home/runner/work/Arion/Arion/include/arion/platforms/linux/elf_parser.hpp