Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
elf 0.0.9 - Docs.rs
[go: Go Back, main page]

elf 0.0.9

A pure-rust library for parsing ELF files
Documentation

Build Status

rust-elf

Pure-Rust library for parsing ELF files

Documentation

Example:

extern crate elf;

use std::env;
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);