Struct goblin::elf::header::Header
[−]
[src]
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, }
An ELF header
Fields
e_ident: [u8; 16]
e_type: u16
e_machine: u16
e_version: u32
e_entry: u64
e_phoff: u64
e_shoff: u64
e_flags: u32
e_ehsize: u16
e_phentsize: u16
e_phnum: u16
e_shentsize: u16
e_shnum: u16
e_shstrndx: u16
Methods
impl Header
[src]
fn size(ctx: &Ctx) -> usize
[src]
Return the size of the underlying program header, given a container
fn container(&self) -> Result<Container>
[src]
Returns the container type this header specifies
fn endianness(&self) -> Result<Endian>
[src]
Returns the byte order this header specifies
fn new(ctx: Ctx) -> Self
[src]
Trait Implementations
impl From<Header> for ElfHeader
[src]
impl From<Header> for ElfHeader
[src]
impl Copy for Header
[src]
impl Clone for Header
[src]
fn clone(&self) -> Header
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Header
[src]
fn eq(&self, __arg_0: &Header) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Header) -> bool
[src]
This method tests for !=
.
impl Debug for Header
[src]
impl SizeWith<Ctx> for Header
[src]
impl<'a> TryFromCtx<'a, Endian> for Header
[src]
type Error = Error
type Size = usize
fn try_from_ctx(bytes: &'a [u8], _ctx: Endian) -> Result<(Self, Self::Size)>
[src]
impl TryIntoCtx<Endian> for Header
[src]
type Error = Error
type Size = usize
fn try_into_ctx(
self,
bytes: &mut [u8],
_ctx: Endian
) -> Result<Self::Size, Self::Error>
[src]
self,
bytes: &mut [u8],
_ctx: Endian
) -> Result<Self::Size, Self::Error>