pub struct SectionTable<'data, Elf: FileHeader, R = &'data [u8]> where
    R: ReadRef<'data>, 
{ /* private fields */ }
Expand description

The table of section headers in an ELF file.

Also includes the string table used for the section names.

Implementations

Create a new section table.

Iterate over the section headers.

Return true if the section table is empty.

The number of section headers.

Return the section header at the given index.

Return the section header with the given name.

Ignores sections with invalid names.

Return the section name for the given section header.

Return the string table at the given section index.

Returns an error if the section is not a string table.

Return the symbol table of the given section type.

Returns an empty symbol table if the symbol table does not exist.

Return the symbol table at the given section index.

Returns an error if the section is not a symbol table.

Create a mapping from section index to associated relocation sections.

Return the contents of a dynamic section.

Also returns the linked string table index.

Returns Ok(None) if there is no SHT_DYNAMIC section. Returns Err for invalid values.

Return the header of a SysV hash section.

Returns Ok(None) if there is no SysV GNU hash section. Returns Err for invalid values.

Return the contents of a SysV hash section.

Also returns the linked symbol table index.

Returns Ok(None) if there is no SysV hash section. Returns Err for invalid values.

Return the header of a GNU hash section.

Returns Ok(None) if there is no GNU hash section. Returns Err for invalid values.

Return the contents of a GNU hash section.

Also returns the linked symbol table index.

Returns Ok(None) if there is no GNU hash section. Returns Err for invalid values.

Return the contents of a SHT_GNU_VERSYM section.

Also returns the linked symbol table index.

Returns Ok(None) if there is no SHT_GNU_VERSYM section. Returns Err for invalid values.

Return the contents of a SHT_GNU_VERDEF section.

Also returns the linked string table index.

Returns Ok(None) if there is no SHT_GNU_VERDEF section. Returns Err for invalid values.

Return the contents of a SHT_GNU_VERNEED section.

Also returns the linked string table index.

Returns Ok(None) if there is no SHT_GNU_VERNEED section. Returns Err for invalid values.

Returns the symbol version table.

Returns Ok(None) if there is no SHT_GNU_VERSYM section. Returns Err for invalid values.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. 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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.