pub struct Elf<'a> {
    pub header: &'a Header,
    pub section_names: StringTable<'a>,
    /* private fields */
}
Expand description

A 32bit little-endian RISC-V ELF file.

use elf_riscv32::*;
let elf = Elf::new(&data).unwrap();
for section in elf.sections().unwrap() {
    let section = section.unwrap();
    println!("{} = {section:X?}", elf.section_name(&section).unwrap())
}
for program in elf.programs().unwrap() {
    let program = program.unwrap();
    println!("{program:X?}")
}

Fields

header: &'a Headersection_names: StringTable<'a>

Implementations

Get an iterator over programs.

Get the section name string given an offset into the section header string table.

Get an iterator over sections.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.