[][src]Struct goblin::elf::section_header::section_header64::SectionHeader

#[repr(C)]
pub struct SectionHeader {
    pub sh_name: u32,
    pub sh_type: u32,
    pub sh_flags: u64,
    pub sh_addr: u64,
    pub sh_offset: u64,
    pub sh_size: u64,
    pub sh_link: u32,
    pub sh_info: u32,
    pub sh_addralign: u64,
    pub sh_entsize: u64,
}

Section Headers are typically used by humans and static linkers for additional information or how to relocate the object

NOTE section headers are strippable from a binary without any loss of portability/executability; do not rely on them being there!

Fields

sh_name: u32

Section name (string tbl index)

sh_type: u32

Section type

sh_flags: u64

Section flags

sh_addr: u64

Section virtual addr at execution

sh_offset: u64

Section file offset

sh_size: u64

Section size in bytes

sh_link: u32

Link to another section

sh_info: u32

Additional section information

sh_addralign: u64

Section alignment

sh_entsize: u64

Entry size if section holds table

Methods

impl SectionHeader[src]

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

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

Trait Implementations

impl PartialEq<SectionHeader> for SectionHeader[src]

impl Copy for SectionHeader[src]

impl Eq for SectionHeader[src]

impl Default for SectionHeader[src]

impl From<SectionHeader> for ElfSectionHeader[src]

impl From<SectionHeader> for SectionHeader[src]

impl Clone for SectionHeader[src]

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

Performs copy-assignment from source. Read more

impl Debug for SectionHeader[src]

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

type Error = Error

type Size = usize

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

type Error = Error

type Size = usize

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

type Error = Error

type Size = usize

impl SizeWith<Endian> for SectionHeader[src]

type Units = usize

impl Plain for SectionHeader[src]

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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