Module elf
Expand description
Module for the ELF file format support in LIEF.
The Binary structure exposes the main API to inspect an ELF file. It can be instantiated,
using either: crate::elf::parse, crate::elf::Binary::parse or crate::Binary::parse
let elf = lief::elf::parse("/bin/ls").unwrap();
for section in elf.sections() {
println!("section: {}", section.name());
}Modules§
Structs§
- Binary
- This is the main interface to read and write ELF binary attributes.
- GnuHash
- Structure that wraps the GNU-hash implementation
- Header
- Class which represents the ELF’s header. This class mirrors the raw
ELF
Elfxx_Ehdrstructure - Parser
Config - This structure is used to tweak the ELF parser:
crate::elf::Binary::parse_with_config - Relocation
- Structure which represents an ELF relocation
- Section
- Structure which represents an ELF Section
- Segment
- Structure which represents an ELF segment
- Symbol
- Structure which represents an ELF symbol
- Symbol
Version - Structure which represents an entry defined in the
DT_VERSYMdynamic entry - Symbol
Version Aux - Symbol
Version AuxRequirement - Symbol
Version Definition - Structure which represents an entry defined in
DT_VERDEFor.gnu.version_d - Symbol
Version Requirement - Structure which represents an entry in the
DT_VERNEEDor.gnu.version_rtable - Sysv
Hash - This structure wraps the sysv-hash info
Enums§
- Dynamic
Entries - Enum that represents the different variants of a dynamic entry
- Notes
- The different notes recognized and supported by LIEF
- Phdr
Reloc - Strategy used for relocating the PHDR table
- SecInsert
Pos - Strategy for inserting a new section
Functions§
- check_
layout - Check that the layout of the given binary is correct
- parse
- Parse an ELF file from the given filepath
- parse_
from_ dump - Parse an ELF binary from a memory dump located at
paththat was mapped at the virtual addressaddr - parse_
from_ dump_ with_ config - Same as
parse_from_dumpbut with a provided configuration - parse_
with_ config - Parse an ELF file from the given filepath and configuration