[][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 64-bit ProgramHeader typically specifies how to map executable and data segments into memory


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


impl ProgramHeader[src]

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

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

pub unsafe fn from_raw_parts<'a>(
    phdrp: *const ProgramHeader,
    phnum: usize
) -> &'a [ProgramHeader]


This function creates a ProgramHeader directly from a raw pointer

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

Trait Implementations

impl Clone for ProgramHeader[src]

impl Copy for ProgramHeader[src]

impl Debug for ProgramHeader[src]

impl Default for ProgramHeader[src]

impl From<ProgramHeader> for ElfProgramHeader[src]

impl From<ProgramHeader> for ProgramHeader[src]

impl PartialEq<ProgramHeader> for ProgramHeader[src]

impl Plain for ProgramHeader[src]

impl SizeWith<Endian> for ProgramHeader[src]

impl StructuralPartialEq for ProgramHeader[src]

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

type Error = Error

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

type Error = Error

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

type Error = Error

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.