Struct object::elf::FileHeader64
source · #[repr(C)]pub struct FileHeader64<E: Endian> {Show 14 fields
pub e_ident: Ident,
pub e_type: U16<E>,
pub e_machine: U16<E>,
pub e_version: U32<E>,
pub e_entry: U64<E>,
pub e_phoff: U64<E>,
pub e_shoff: U64<E>,
pub e_flags: U32<E>,
pub e_ehsize: U16<E>,
pub e_phentsize: U16<E>,
pub e_phnum: U16<E>,
pub e_shentsize: U16<E>,
pub e_shnum: U16<E>,
pub e_shstrndx: U16<E>,
}
Expand description
The header at the start of every 64-bit ELF file.
Fields§
§e_ident: Ident
Magic number and other information.
e_type: U16<E>
Object file type. One of the ET_*
constants.
e_machine: U16<E>
Architecture. One of the EM_*
constants.
e_version: U32<E>
Object file version. Must be EV_CURRENT
.
e_entry: U64<E>
Entry point virtual address.
e_phoff: U64<E>
Program header table file offset.
e_shoff: U64<E>
Section header table file offset.
e_flags: U32<E>
Processor-specific flags.
A combination of the EF_*
constants.
e_ehsize: U16<E>
Size in bytes of this header.
e_phentsize: U16<E>
Program header table entry size.
e_phnum: U16<E>
Program header table entry count.
If the count is greater than or equal to PN_XNUM
then this field is set to
PN_XNUM
and the count is stored in the sh_info
field of section 0.
e_shentsize: U16<E>
Section header table entry size.
e_shnum: U16<E>
Section header table entry count.
If the count is greater than or equal to SHN_LORESERVE
then this field is set to
0
and the count is stored in the sh_size
field of section 0.
first section header.
e_shstrndx: U16<E>
Section header string table index.
If the index is greater than or equal to SHN_LORESERVE
then this field is set to
SHN_XINDEX
and the index is stored in the sh_link
field of section 0.
Trait Implementations§
source§impl<E: Clone + Endian> Clone for FileHeader64<E>
impl<E: Clone + Endian> Clone for FileHeader64<E>
source§fn clone(&self) -> FileHeader64<E>
fn clone(&self) -> FileHeader64<E>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<Endian: Endian> FileHeader for FileHeader64<Endian>
impl<Endian: Endian> FileHeader for FileHeader64<Endian>
type Word = u64
type Sword = i64
type Endian = Endian
type ProgramHeader = ProgramHeader64<Endian>
type SectionHeader = SectionHeader64<Endian>
type CompressionHeader = CompressionHeader64<Endian>
type NoteHeader = NoteHeader32<Endian>
type Dyn = Dyn64<Endian>
type Sym = Sym64<Endian>
type Rel = Rel64<Endian>
type Rela = Rela64<Endian>
source§fn is_type_64(&self) -> bool
fn is_type_64(&self) -> bool
fn e_ident(&self) -> &Ident
fn e_type(&self, endian: Self::Endian) -> u16
fn e_machine(&self, endian: Self::Endian) -> u16
fn e_version(&self, endian: Self::Endian) -> u32
fn e_entry(&self, endian: Self::Endian) -> Self::Word
fn e_phoff(&self, endian: Self::Endian) -> Self::Word
fn e_shoff(&self, endian: Self::Endian) -> Self::Word
fn e_flags(&self, endian: Self::Endian) -> u32
fn e_ehsize(&self, endian: Self::Endian) -> u16
fn e_phentsize(&self, endian: Self::Endian) -> u16
fn e_phnum(&self, endian: Self::Endian) -> u16
fn e_shentsize(&self, endian: Self::Endian) -> u16
fn e_shnum(&self, endian: Self::Endian) -> u16
fn e_shstrndx(&self, endian: Self::Endian) -> u16
source§fn parse<'data, R: ReadRef<'data>>(data: R) -> Result<&'data Self>
fn parse<'data, R: ReadRef<'data>>(data: R) -> Result<&'data Self>
source§fn is_supported(&self) -> bool
fn is_supported(&self) -> bool
fn is_class_32(&self) -> bool
fn is_class_64(&self) -> bool
fn is_little_endian(&self) -> bool
fn is_big_endian(&self) -> bool
fn endian(&self) -> Result<Self::Endian>
source§fn section_0<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<&'data Self::SectionHeader>>
fn section_0<'data, R: ReadRef<'data>>( &self, endian: Self::Endian, data: R ) -> Result<Option<&'data Self::SectionHeader>>
source§fn phnum<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<usize>
fn phnum<'data, R: ReadRef<'data>>( &self, endian: Self::Endian, data: R ) -> Result<usize>
e_phnum
field of the header. Handles extended values. Read moresource§fn shnum<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<usize>
fn shnum<'data, R: ReadRef<'data>>( &self, endian: Self::Endian, data: R ) -> Result<usize>
e_shnum
field of the header. Handles extended values. Read moresource§fn shstrndx<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<u32>
fn shstrndx<'data, R: ReadRef<'data>>( &self, endian: Self::Endian, data: R ) -> Result<u32>
e_shstrndx
field of the header. Handles extended values. Read more