Trait object::read::ObjectSection [−][src]
A section defined in an object file.
Associated Types
type RelocationIterator: Iterator<Item = (u64, Relocation)>
[src]
An iterator over the relocations for a section.
The first field in the item tuple is the section offset that the relocation applies to.
Required methods
fn index(&self) -> SectionIndex
[src]
Returns the section index.
fn address(&self) -> u64
[src]
Returns the address of the section.
fn size(&self) -> u64
[src]
Returns the size of the section in memory.
fn align(&self) -> u64
[src]
Returns the alignment of the section in memory.
fn file_range(&self) -> Option<(u64, u64)>
[src]
Returns offset and size of on-disk segment (if any).
fn data(&self) -> Result<&'data [u8]>
[src]
Returns the raw contents of the section.
The length of this data may be different from the size of the section in memory.
This does not do any decompression.
fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>>
[src]
Return the raw contents of the section data in the given range.
This does not do any decompression.
Returns Ok(None)
if the section does not contain the given range.
fn compressed_data(&self) -> Result<CompressedData<'data>>
[src]
Returns the potentially compressed contents of the section, along with information about the compression.
fn name(&self) -> Result<&str>
[src]
Returns the name of the section.
fn segment_name(&self) -> Result<Option<&str>>
[src]
Returns the name of the segment for this section.
fn kind(&self) -> SectionKind
[src]
Return the kind of this section.
fn relocations(&self) -> Self::RelocationIterator
[src]
Get the relocations for this section.
fn flags(&self) -> SectionFlags
[src]
Section flags that are specific to each file format.
Provided methods
fn uncompressed_data(&self) -> Result<Cow<'data, [u8]>>
[src]
Returns the uncompressed contents of the section.
The length of this data may be different from the size of the section in memory.
If no compression is detected, then returns the data unchanged.
Returns Err
if decompression fails.
Implementors
impl<'data, 'file> ObjectSection<'data> for CoffSection<'data, 'file>
[src]
type RelocationIterator = CoffRelocationIterator<'data, 'file>
fn index(&self) -> SectionIndex
[src]
fn address(&self) -> u64
[src]
fn size(&self) -> u64
[src]
fn align(&self) -> u64
[src]
fn file_range(&self) -> Option<(u64, u64)>
[src]
fn data(&self) -> Result<&'data [u8]>
[src]
fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>>
[src]
fn compressed_data(&self) -> Result<CompressedData<'data>>
[src]
fn name(&self) -> Result<&str>
[src]
fn segment_name(&self) -> Result<Option<&str>>
[src]
fn kind(&self) -> SectionKind
[src]
fn relocations(&self) -> CoffRelocationIterator<'data, 'file>ⓘNotable traits for CoffRelocationIterator<'data, 'file>
impl<'data, 'file> Iterator for CoffRelocationIterator<'data, 'file> type Item = (u64, Relocation);
[src]
Notable traits for CoffRelocationIterator<'data, 'file>
impl<'data, 'file> Iterator for CoffRelocationIterator<'data, 'file> type Item = (u64, Relocation);
fn flags(&self) -> SectionFlags
[src]
impl<'data, 'file> ObjectSection<'data> for Section<'data, 'file>
[src]
type RelocationIterator = SectionRelocationIterator<'data, 'file>
fn index(&self) -> SectionIndex
[src]
fn address(&self) -> u64
[src]
fn size(&self) -> u64
[src]
fn align(&self) -> u64
[src]
fn file_range(&self) -> Option<(u64, u64)>
[src]
fn data(&self) -> Result<&'data [u8]>
[src]
fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>>
[src]
fn compressed_data(&self) -> Result<CompressedData<'data>>
[src]
fn name(&self) -> Result<&str>
[src]
fn segment_name(&self) -> Result<Option<&str>>
[src]
fn kind(&self) -> SectionKind
[src]
fn relocations(&self) -> SectionRelocationIterator<'data, 'file>ⓘNotable traits for SectionRelocationIterator<'data, 'file>
impl<'data, 'file> Iterator for SectionRelocationIterator<'data, 'file> type Item = (u64, Relocation);
[src]
Notable traits for SectionRelocationIterator<'data, 'file>
impl<'data, 'file> Iterator for SectionRelocationIterator<'data, 'file> type Item = (u64, Relocation);
fn flags(&self) -> SectionFlags
[src]
impl<'data, 'file, Elf: FileHeader> ObjectSection<'data> for ElfSection<'data, 'file, Elf>
[src]
type RelocationIterator = ElfSectionRelocationIterator<'data, 'file, Elf>
fn index(&self) -> SectionIndex
[src]
fn address(&self) -> u64
[src]
fn size(&self) -> u64
[src]
fn align(&self) -> u64
[src]
fn file_range(&self) -> Option<(u64, u64)>
[src]
fn data(&self) -> Result<&'data [u8]>
[src]
fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>>
[src]
fn compressed_data(&self) -> Result<CompressedData<'data>>
[src]
fn name(&self) -> Result<&str>
[src]
fn segment_name(&self) -> Result<Option<&str>>
[src]
fn kind(&self) -> SectionKind
[src]
fn relocations(&self) -> ElfSectionRelocationIterator<'data, 'file, Elf>ⓘNotable traits for ElfSectionRelocationIterator<'data, 'file, Elf>
impl<'data, 'file, Elf: FileHeader> Iterator for ElfSectionRelocationIterator<'data, 'file, Elf> type Item = (u64, Relocation);
[src]
Notable traits for ElfSectionRelocationIterator<'data, 'file, Elf>
impl<'data, 'file, Elf: FileHeader> Iterator for ElfSectionRelocationIterator<'data, 'file, Elf> type Item = (u64, Relocation);
fn flags(&self) -> SectionFlags
[src]
impl<'data, 'file, Mach: MachHeader> ObjectSection<'data> for MachOSection<'data, 'file, Mach>
[src]
type RelocationIterator = MachORelocationIterator<'data, 'file, Mach>
fn index(&self) -> SectionIndex
[src]
fn address(&self) -> u64
[src]
fn size(&self) -> u64
[src]
fn align(&self) -> u64
[src]
fn file_range(&self) -> Option<(u64, u64)>
[src]
fn data(&self) -> Result<&'data [u8]>
[src]
fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>>
[src]
fn compressed_data(&self) -> Result<CompressedData<'data>>
[src]
fn name(&self) -> Result<&str>
[src]
fn segment_name(&self) -> Result<Option<&str>>
[src]
fn kind(&self) -> SectionKind
[src]
fn relocations(&self) -> MachORelocationIterator<'data, 'file, Mach>ⓘNotable traits for MachORelocationIterator<'data, 'file, Mach>
impl<'data, 'file, Mach: MachHeader> Iterator for MachORelocationIterator<'data, 'file, Mach> type Item = (u64, Relocation);
[src]
Notable traits for MachORelocationIterator<'data, 'file, Mach>
impl<'data, 'file, Mach: MachHeader> Iterator for MachORelocationIterator<'data, 'file, Mach> type Item = (u64, Relocation);
fn flags(&self) -> SectionFlags
[src]
impl<'data, 'file, Pe: ImageNtHeaders> ObjectSection<'data> for PeSection<'data, 'file, Pe>
[src]
type RelocationIterator = PeRelocationIterator<'data, 'file>
fn index(&self) -> SectionIndex
[src]
fn address(&self) -> u64
[src]
fn size(&self) -> u64
[src]
fn align(&self) -> u64
[src]
fn file_range(&self) -> Option<(u64, u64)>
[src]
fn data(&self) -> Result<&'data [u8]>
[src]
fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>>
[src]
fn compressed_data(&self) -> Result<CompressedData<'data>>
[src]
fn name(&self) -> Result<&str>
[src]
fn segment_name(&self) -> Result<Option<&str>>
[src]
fn kind(&self) -> SectionKind
[src]
fn relocations(&self) -> PeRelocationIterator<'data, 'file>ⓘNotable traits for PeRelocationIterator<'data, 'file>
impl<'data, 'file> Iterator for PeRelocationIterator<'data, 'file> type Item = (u64, Relocation);
[src]
Notable traits for PeRelocationIterator<'data, 'file>
impl<'data, 'file> Iterator for PeRelocationIterator<'data, 'file> type Item = (u64, Relocation);