Trait object::read::ObjectSection [−][src]
pub trait ObjectSection<'data>: Sealed { type RelocationIterator: Iterator<Item = (u64, Relocation)>;}Show methods
fn index(&self) -> SectionIndex; fn address(&self) -> u64; fn size(&self) -> u64; fn align(&self) -> u64; fn file_range(&self) -> Option<(u64, u64)>; fn data(&self) -> Result<&'data [u8]>; fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>>; fn compressed_file_range(&self) -> Result<CompressedFileRange>; fn compressed_data(&self) -> Result<CompressedData<'data>>; fn name(&self) -> Result<&str>; fn segment_name(&self) -> Result<Option<&str>>; fn kind(&self) -> SectionKind; fn relocations(&self) -> Self::RelocationIterator; fn flags(&self) -> SectionFlags; fn uncompressed_data(&self) -> Result<Cow<'data, [u8]>> { ... }
Expand description
A section defined in an object file.
Associated Types
type RelocationIterator: Iterator<Item = (u64, Relocation)>
[src]
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]
fn index(&self) -> SectionIndex
[src]Returns the section index.
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.
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_file_range(&self) -> Result<CompressedFileRange>
[src]
fn compressed_file_range(&self) -> Result<CompressedFileRange>
[src]Returns the potentially compressed file range of the section, along with information about the compression.
fn compressed_data(&self) -> Result<CompressedData<'data>>
[src]
fn compressed_data(&self) -> Result<CompressedData<'data>>
[src]Returns the potentially compressed contents of the section, along with information about the compression.
fn segment_name(&self) -> Result<Option<&str>>
[src]
fn segment_name(&self) -> Result<Option<&str>>
[src]Returns the name of the segment for this section.
fn kind(&self) -> SectionKind
[src]
fn kind(&self) -> SectionKind
[src]Return the kind of this section.
fn relocations(&self) -> Self::RelocationIterator
[src]
fn relocations(&self) -> Self::RelocationIterator
[src]Get the relocations for this section.
fn flags(&self) -> SectionFlags
[src]
fn flags(&self) -> SectionFlags
[src]Section flags that are specific to each file format.
Provided methods
Implementors
impl<'data, 'file, Elf, R> ObjectSection<'data> for ElfSection<'data, 'file, Elf, R> where
Elf: FileHeader,
R: ReadRef<'data>,
[src]
impl<'data, 'file, Elf, R> ObjectSection<'data> for ElfSection<'data, 'file, Elf, R> where
Elf: FileHeader,
R: ReadRef<'data>,
[src]type RelocationIterator = ElfSectionRelocationIterator<'data, 'file, Elf, R>
fn relocations(&self) -> ElfSectionRelocationIterator<'data, 'file, Elf, R>ⓘNotable traits for ElfSectionRelocationIterator<'data, 'file, Elf, R>
impl<'data, 'file, Elf, R> Iterator for ElfSectionRelocationIterator<'data, 'file, Elf, R> where
Elf: FileHeader,
R: ReadRef<'data>, type Item = (u64, Relocation);
[src]impl<'data, 'file, Mach, R> ObjectSection<'data> for MachOSection<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>,
[src]
impl<'data, 'file, Mach, R> ObjectSection<'data> for MachOSection<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>,
[src]type RelocationIterator = MachORelocationIterator<'data, 'file, Mach, R>
fn relocations(&self) -> MachORelocationIterator<'data, 'file, Mach, R>ⓘNotable traits for MachORelocationIterator<'data, 'file, Mach, R>
impl<'data, 'file, Mach, R> Iterator for MachORelocationIterator<'data, 'file, Mach, R> where
Mach: MachHeader,
R: ReadRef<'data>, type Item = (u64, Relocation);
[src]impl<'data, 'file, Pe, R> ObjectSection<'data> for PeSection<'data, 'file, Pe, R> where
Pe: ImageNtHeaders,
R: ReadRef<'data>,
[src]
impl<'data, 'file, Pe, R> ObjectSection<'data> for PeSection<'data, 'file, Pe, R> where
Pe: ImageNtHeaders,
R: ReadRef<'data>,
[src]type RelocationIterator = PeRelocationIterator<'data, 'file, R>
fn relocations(&self) -> PeRelocationIterator<'data, 'file, R>ⓘNotable traits for PeRelocationIterator<'data, 'file, R>
impl<'data, 'file, R> Iterator for PeRelocationIterator<'data, 'file, R> type Item = (u64, Relocation);
[src]type RelocationIterator = CoffRelocationIterator<'data, 'file, R>
fn relocations(&self) -> CoffRelocationIterator<'data, 'file, R>ⓘNotable traits for CoffRelocationIterator<'data, 'file, R>
impl<'data, 'file, R: ReadRef<'data>> Iterator for CoffRelocationIterator<'data, 'file, R> type Item = (u64, Relocation);
[src]type RelocationIterator = SectionRelocationIterator<'data, 'file, R>
fn relocations(&self) -> SectionRelocationIterator<'data, 'file, R>ⓘNotable traits for SectionRelocationIterator<'data, 'file, R>
impl<'data, 'file, R: ReadRef<'data>> Iterator for SectionRelocationIterator<'data, 'file, R> type Item = (u64, Relocation);
[src]