Skip to main content

Crate elfex

Crate elfex 

Source
Expand description

A bespoke ELF reader, editor, and builder.

elfex parses, edits, and rebuilds 32-bit and 64-bit ELF objects. It has no third-party dependencies. It is no_std with extern crate alloc; the default std feature adds file entry points and std::io error support.

ELF has no relative virtual address, so elfex defines an image-relative offset ioff = vaddr - image_base as a uniform addressing model across raw files, loader-mapped images, and relocated images.

Re-exports§

pub use builder::ElfBuilder;
pub use dynamic::DynTag;
pub use dynamic::DynamicEntry;
pub use dynamic::DynamicTable;
pub use elf::ElfImage;
pub use elf_file::ElfFile;
pub use error::Error;
pub use error::ErrorKind;
pub use error::Result;
pub use header::ElfHeader;
pub use header::ElfHeaders;
pub use header::ElfType;
pub use header::Machine;
pub use ident::ElfClass;
pub use ident::ElfIdent;
pub use ident::Endian;
pub use ident::OsAbi;
pub use notes::Note;
pub use program::ProgramHeader;
pub use program::Segment;
pub use program::SegmentFlags;
pub use program::SegmentType;
pub use reader::ReadAt;
pub use reader::SliceReader;
pub use reader::VecReader;
pub use reloc::RelocKind;
pub use reloc::RelocationEntry;
pub use reloc::RelocationSection;
pub use section::Section;
pub use section::SectionFlags;
pub use section::SectionHeader;
pub use section::SectionType;
pub use strtab::StringTable;
pub use symbol::Symbol;
pub use symbol::SymbolBind;
pub use symbol::SymbolTable;
pub use symbol::SymbolType;
pub use symbol::SymbolVisibility;
pub use tls::TlsInfo;
pub use reader::FileReader;

Modules§

builder
Fluent builder for constructing an ElfImage from scratch.
dynamic
ELF dynamic linking metadata.
elf
The ELF image container.
elf_file
Lossless ELF file container.
error
Error types for ELF parsing, editing, and writing.
header
The ELF file header and the header-only view.
ident
ELF identification bytes and the enums derived from them.
notes
ELF note records.
program
ELF program headers and loadable segments.
reader
Positional reading of ELF byte sources.
reloc
ELF relocation tables and dynamic relocation classification.
section
ELF section headers and sections.
strtab
ELF string table access.
symbol
ELF symbol tables.
tls
ELF thread-local storage metadata.
validation
ELF structural validation issues.