Struct goblin::elf::header::header64::Header
[−]
[src]
#[repr(C)]pub struct Header { pub e_ident: [u8; 16], pub e_type: u16, pub e_machine: u16, pub e_version: u32, pub e_entry: u64, pub e_phoff: u64, pub e_shoff: u64, pub e_flags: u32, pub e_ehsize: u16, pub e_phentsize: u16, pub e_phnum: u16, pub e_shentsize: u16, pub e_shnum: u16, pub e_shstrndx: u16, }
Fields
e_ident: [u8; 16]
Magic number and other info
e_type: u16
Object file type
e_machine: u16
Architecture
e_version: u32
Object file version
e_entry: u64
Entry point virtual address
e_phoff: u64
Program header table file offset
e_shoff: u64
Section header table file offset
e_flags: u32
Processor-specific flags
e_ehsize: u16
ELF header size in bytes
e_phentsize: u16
Program header table entry size
e_phnum: u16
Program header table entry count
e_shentsize: u16
Section header table entry size
e_shnum: u16
Section header table entry count
e_shstrndx: u16
Section header string table index
Methods
impl Header
[src]
fn from_fd(buffer: &mut File) -> Result<Header>
Load a header from a file. You must ensure the seek is at the correct position.
fn parse<S: AsRef<[u8]>>(buffer: &S) -> Result<Header>
Parses an ELF header from the given buffer
impl Header
[src]
fn from_bytes(bytes: &[u8; 64]) -> &Header
Returns the corresponding ELF header from the given byte array.
Trait Implementations
impl From<ElfHeader> for Header
[src]
impl<'a> TryFromCtx<'a> for Header
[src]
type Error = Error
fn try_from_ctx(buffer: &'a [u8],
(offset, _): (usize, Endian))
-> Result<Self, Self::Error>
(offset, _): (usize, Endian))
-> Result<Self, Self::Error>
impl TryIntoCtx for Header
[src]
type Error = Error
fn try_into_ctx(self,
bytes: &mut [u8],
(offset, _endianness): (usize, Endian))
-> Result<(), Self::Error>
bytes: &mut [u8],
(offset, _endianness): (usize, Endian))
-> Result<(), Self::Error>
a Pwrite impl for Header: note we use the endianness value in the header, and not a parameter
impl Clone for Header
[src]
fn clone(&self) -> Header
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for Header
[src]
impl Default for Header
[src]
impl PartialEq for Header
[src]
fn eq(&self, __arg_0: &Header) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Header) -> bool
This method tests for !=
.