[][src]Struct goblin::elf::program_header::program_header64::ProgramHeader

#[repr(C)]
pub struct ProgramHeader { pub p_type: u32, pub p_flags: u32, pub p_offset: u64, pub p_vaddr: u64, pub p_paddr: u64, pub p_filesz: u64, pub p_memsz: u64, pub p_align: u64, }

A 32-bit ProgramHeader typically specifies how to map executable and data segments into memory

Fields

p_type: u32

Segment type

p_flags: u32

Segment flags

p_offset: u64

Segment file offset

p_vaddr: u64

Segment virtual address

p_paddr: u64

Segment physical address

p_filesz: u64

Segment size in file

p_memsz: u64

Segment size in memory

p_align: u64

Segment alignment

Methods

impl ProgramHeader[src]

pub fn parse(
    bytes: &[u8],
    offset: usize,
    count: usize,
    ctx: Endian
) -> Result<Vec<ProgramHeader>>
[src]

Important traits for Vec<u8>
pub fn from_bytes(bytes: &[u8], phnum: usize) -> Vec<ProgramHeader>[src]

Important traits for &'_ [u8]
pub unsafe fn from_raw_parts<'a>(
    phdrp: *const ProgramHeader,
    phnum: usize
) -> &'a [ProgramHeader]
[src]

pub fn from_fd(
    fd: &mut File,
    offset: u64,
    count: usize
) -> Result<Vec<ProgramHeader>>
[src]

Trait Implementations

impl Copy for ProgramHeader[src]

impl PartialEq<ProgramHeader> for ProgramHeader[src]

impl Clone for ProgramHeader[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for ProgramHeader[src]

impl From<ProgramHeader> for ElfProgramHeader[src]

impl From<ProgramHeader> for ProgramHeader[src]

impl Debug for ProgramHeader[src]

impl<'a> TryFromCtx<'a, Endian, [u8]> for ProgramHeader where
    ProgramHeader: 'a, 
[src]

type Error = Error

type Size = usize

impl<'a> TryIntoCtx<Endian, [u8]> for &'a ProgramHeader[src]

type Error = Error

type Size = usize

impl TryIntoCtx<Endian, [u8]> for ProgramHeader[src]

type Error = Error

type Size = usize

impl SizeWith<Endian> for ProgramHeader[src]

type Units = usize

impl Plain for ProgramHeader[src]

default fn from_bytes(bytes: &[u8]) -> Result<&Self, Error>[src]

default fn slice_from_bytes(bytes: &[u8]) -> Result<&[Self], Error>[src]

default fn slice_from_bytes_len(
    bytes: &[u8],
    len: usize
) -> Result<&[Self], Error>
[src]

default fn from_mut_bytes(bytes: &mut [u8]) -> Result<&mut Self, Error>[src]

default fn slice_from_mut_bytes(bytes: &mut [u8]) -> Result<&mut [Self], Error>[src]

default fn slice_from_mut_bytes_len(
    bytes: &mut [u8],
    len: usize
) -> Result<&mut [Self], Error>
[src]

default fn copy_from_bytes(&mut self, bytes: &[u8]) -> Result<(), Error>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.