Module rvsim::elf[][src]

A simple copy-free ELF parser.

This parser is limited, and parses only the specific kind of ELF files we expect to run.

Elf32::parse can be used to parse a byte array into structs that reference the original data. Note that these structs also hold values in the original endianness.

Structs

Elf32

ELF 32-bit file structure.

ElfHeader32

ELF 32-bit header.

ElfIdent

ELF identity header.

ElfProgramHeader32

ELF 32-bit program header.

ElfSectionHeader32

ELF 32-bit section header.

Constants

ELF_IDENT_ABI_SYSV

System V ABI type value.

ELF_IDENT_CLASS_32

32-bit ELF class value.

ELF_IDENT_DATA_2LSB

Little-endian ELF datatype value.

ELF_IDENT_MAGIC

Expected ELF magic value.

ELF_IDENT_VERSION_CURRENT

Expected ELF identity version.

ELF_MACHINE_RISCV

RISC-V machine type value.

ELF_PROGRAM_TYPE_LOADABLE

Program header bit indicating a loadable entry.

ELF_SECTION_TYPE_NOBITS

Section header type indicating space with no data (bss).

ELF_TYPE_EXECUTABLE

Executable type value.

ELF_VERSION_CURRENT

Expected ELF version.