Struct ImageSectionHeader
struct ImageSectionHeader { ... }
Fields
name: [u8; 8]virtual_size: crate::endian::U32<crate::endian::LittleEndian>virtual_address: crate::endian::U32<crate::endian::LittleEndian>size_of_raw_data: crate::endian::U32<crate::endian::LittleEndian>pointer_to_raw_data: crate::endian::U32<crate::endian::LittleEndian>pointer_to_relocations: crate::endian::U32<crate::endian::LittleEndian>pointer_to_linenumbers: crate::endian::U32<crate::endian::LittleEndian>number_of_relocations: crate::endian::U16<crate::endian::LittleEndian>number_of_linenumbers: crate::endian::U16<crate::endian::LittleEndian>characteristics: crate::endian::U32<crate::endian::LittleEndian>
Implementations
impl pe::ImageSectionHeader
fn name_offset(self: &Self) -> Result<Option<u32>>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 withraw_nameinstead.fn name<'data, R: ReadRef<'data>>(self: &'data Self, strings: StringTable<'data, R>) -> Result<&'data [u8]>Return the section name.
This handles decoding names that are offsets into the symbol string table.
fn raw_name(self: &Self) -> &[u8]Return the raw section name.
fn coff_file_range(self: &Self) -> Option<(u32, u32)>Return the offset and size of the section in a COFF file.
Returns
Nonefor sections that have no data in the file.fn coff_data<'data, R: ReadRef<'data>>(self: &Self, data: R) -> result::Result<&'data [u8], ()>Return the section data in a COFF file.
Returns
Ok(&[])if the section has no data. ReturnsErrfor invalid values.fn coff_alignment(self: &Self) -> u64Return the section alignment in bytes.
This is only valid for sections in a COFF file.
fn coff_relocations<'data, R: ReadRef<'data>>(self: &Self, data: R) -> read::Result<&'data [pe::ImageRelocation]>Read the relocations in a COFF file.
datamust be the entire file data.
impl pe::ImageSectionHeader
fn pe_file_range(self: &Self) -> (u32, u32)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.
fn pe_file_range_at(self: &Self, va: u32) -> Option<(u32, u32)>Return the file offset of the given virtual address, and the remaining size up to the end of the section.
Returns
Noneif the section does not contain the address.fn pe_address_range(self: &Self) -> (u32, u32)Return the virtual address and size of the section.
fn pe_data<'data, R: ReadRef<'data>>(self: &Self, data: R) -> Result<&'data [u8]>Return the section data in a PE file.
The length of the data will be the minimum of the file size and virtual size.
fn pe_data_at<'data, R: ReadRef<'data>>(self: &Self, data: R, va: u32) -> Option<&'data [u8]>Return the data starting at the given virtual address, up to the end of the section.
Ignores sections with invalid data.
Returns
Noneif the section does not contain the address.fn contains_rva(self: &Self, va: u32) -> boolTests whether a given RVA is part of this section
fn pe_data_containing<'data, R: ReadRef<'data>>(self: &Self, data: R, va: u32) -> Option<(&'data [u8], u32)>Return the section data if it contains the given virtual address.
Also returns the virtual address of that section.
Ignores sections with invalid data.
impl Clone for ImageSectionHeader
fn clone(self: &Self) -> ImageSectionHeader
impl Copy for ImageSectionHeader
impl Debug for ImageSectionHeader
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Default for ImageSectionHeader
fn default() -> ImageSectionHeader
impl Freeze for ImageSectionHeader
impl Pod for ImageSectionHeader
impl RefUnwindSafe for ImageSectionHeader
impl Send for ImageSectionHeader
impl Sync for ImageSectionHeader
impl Unpin for ImageSectionHeader
impl UnwindSafe for ImageSectionHeader
impl<T> Any for ImageSectionHeader
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for ImageSectionHeader
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for ImageSectionHeader
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for ImageSectionHeader
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for ImageSectionHeader
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for ImageSectionHeader
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for ImageSectionHeader
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for ImageSectionHeader
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for ImageSectionHeader
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>