yggdrasil-elf/README.md
Christopher Cole c772d63b93
Change README.md badges
Point them to github action results, crates.io, and docs.rs
2022-10-03 12:28:09 -07:00

833 B

Build Status

rust-elf

Pure-Rust library for parsing ELF files

Documentation

Example:

extern crate elf;

use std::path::PathBuf;

let path = PathBuf::from("/some/file/path");
let file = match elf::File::open_path(&path) {
    Ok(f) => f,
    Err(e) => panic!("Error: {:?}", e),
};

let text_scn = match file.get_section(".text") {
    Some(s) => s,
    None => panic!("Failed to look up .text section"),
};

println!("{:?}", text_scn.data);