pub type ElfSegment64<'data, 'file, Endian = Endianness, R = &'data [u8]> = ElfSegment<'data, 'file, FileHeader64<Endian>, R>;
Expand description
A segment in an ElfFile64
.
Aliased Type§
struct ElfSegment64<'data, 'file, Endian = Endianness, R = &'data [u8]> {
pub(super) file: &'file ElfFile<'data, FileHeader64<Endian>, R>,
pub(super) segment: &'data <FileHeader64<Endian> as FileHeader>::ProgramHeader,
}
Fields§
§file: &'file ElfFile<'data, FileHeader64<Endian>, R>
§segment: &'data <FileHeader64<Endian> as FileHeader>::ProgramHeader
Implementations
Source§impl<'data, 'file, Elf: FileHeader, R: ReadRef<'data>> ElfSegment<'data, 'file, Elf, R>
impl<'data, 'file, Elf: FileHeader, R: ReadRef<'data>> ElfSegment<'data, 'file, Elf, R>
Sourcepub fn elf_file(&self) -> &'file ElfFile<'data, Elf, R>
pub fn elf_file(&self) -> &'file ElfFile<'data, Elf, R>
Get the ELF file containing this segment.
Sourcepub fn elf_program_header(&self) -> &'data Elf::ProgramHeader
pub fn elf_program_header(&self) -> &'data Elf::ProgramHeader
Get the raw ELF program header for the segment.
fn bytes(&self) -> Result<&'data [u8]>
Trait Implementations
Source§impl<'data, 'file, Elf, R> Debug for ElfSegment<'data, 'file, Elf, R>
impl<'data, 'file, Elf, R> Debug for ElfSegment<'data, 'file, Elf, R>
Source§impl<'data, 'file, Elf, R> ObjectSegment<'data> for ElfSegment<'data, 'file, Elf, R>where
Elf: FileHeader,
R: ReadRef<'data>,
impl<'data, 'file, Elf, R> ObjectSegment<'data> for ElfSegment<'data, 'file, Elf, R>where
Elf: FileHeader,
R: ReadRef<'data>,
Source§fn file_range(&self) -> (u64, u64)
fn file_range(&self) -> (u64, u64)
Returns the offset and size of the segment in the file.
Source§fn data(&self) -> Result<&'data [u8]>
fn data(&self) -> Result<&'data [u8]>
Returns a reference to the file contents of the segment. Read more
Source§fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>>
fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>>
Return the segment data in the given range. Read more
Source§fn flags(&self) -> SegmentFlags
fn flags(&self) -> SegmentFlags
Return the flags of segment.