Skip to main content

parse_symbol_table

Function parse_symbol_table 

Source
pub fn parse_symbol_table(data: &[u8]) -> Result<Option<SymbolTable>, ElfError>
Expand description

Parse the .symtab section of an ELF32 RV32 file.

Extracts STT_FUNC and STT_OBJECT symbols with global, weak, or local binding. Linker-internal names (starting with . or $) are filtered out.

Returns Ok(None) if the ELF has no .symtab (i.e. it was stripped). Returns Err only if the file is not a valid ELF32 RV32 binary.