Crates.io | elf_parser |
lib.rs | elf_parser |
version | 0.1.1 |
source | src |
created_at | 2022-01-29 19:13:12.96186 |
updated_at | 2022-01-29 19:17:01.684606 |
description | A minimal no_std ELF (32/64) parser. |
homepage | |
repository | https://github.com/gedatsu217/elf_parser |
max_upload_size | |
id | 523755 |
size | 108,601 |
A minimal no_std ELF (32/64) parser.
use elf_parser::Elf64;
fn main() {
let bytes = include_bytes!("path/to/elf_file");
let elf64 = Elf64::from_bytes(bytes).unwrap();
let ehdr = elf64.ehdr();
dbg!(ehdr);
let phdr_iter = elf64.phdr_iter();
for phdr_res in phdr_iter {
let phdr = phdr_res.unwrap();
dbg!(phdr);
}
}