#[repr(C)]
pub struct ImageSectionHeader { pub name: [u8; 8], pub virtual_size: U32<LE>, pub virtual_address: U32<LE>, pub size_of_raw_data: U32<LE>, pub pointer_to_raw_data: U32<LE>, pub pointer_to_relocations: U32<LE>, pub pointer_to_linenumbers: U32<LE>, pub number_of_relocations: U16<LE>, pub number_of_linenumbers: U16<LE>, pub characteristics: U32<LE>, }

Fields§

§name: [u8; 8]§virtual_size: U32<LE>§virtual_address: U32<LE>§size_of_raw_data: U32<LE>§pointer_to_raw_data: U32<LE>§pointer_to_relocations: U32<LE>§pointer_to_linenumbers: U32<LE>§number_of_relocations: U16<LE>§number_of_linenumbers: U16<LE>§characteristics: U32<LE>

Implementations§

Return the string table offset of the section name.

Returns Ok(None) if the name doesn’t use the string table and can be obtained with raw_name instead.

Return the section name.

This handles decoding names that are offsets into the symbol string table.

Return the raw section name.

Return the offset and size of the section in a COFF file.

Returns None for sections that have no data in the file.

Return the section data in a COFF file.

Returns Ok(&[]) if the section has no data. Returns Err for invalid values.

Return the section alignment in bytes.

This is only valid for sections in a COFF file.

Read the relocations in a COFF file.

data must be the entire file data.

Return the offset and size of the section in a PE file.

The size of the range will be the minimum of the file size and virtual size.

Return the file offset of the given virtual address, and the remaining size up to the end of the section.

Returns None if the section does not contain the address.

Return the virtual address and size of the section.

Return the section data in a PE file.

The length of the data will be the minimum of the file size and virtual size.

Return the data starting at the given virtual address, up to the end of the section.

Ignores sections with invalid data.

Returns None if the section does not contain the address.

Tests whether a given RVA is part of this section

Return the section data if it contains the given virtual address.

Also returns the virtual address of that section.

Ignores sections with invalid data.

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

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.