1 unstable release
0.0.1 | Aug 10, 2022 |
---|
#27 in #elf-file
23KB
587 lines
Contains (ELF exe/lib, 1KB) examples/test.elf
elf-riscv32
A no-std ELF parser for elf32-littleriscv designed to be reasonably quick.
elf_riscv32 = "0.0.1"
Requires the ELF file to be aligned in memory as it is parsed in-place. Tries to be minimal as it is intended for use in OS loaders for rv32i.
let elf = Elf::new(&data).unwrap();
for section in elf.sections().unwrap() {
let section = section.unwrap();
println!("{} = {section:X?}", elf.section_name(§ion).unwrap())
}
for program in elf.programs().unwrap() {
let program = program.unwrap();
println!("{program:X?}")
}
Dependencies
~170–315KB