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

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

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: u32

Section flags

sh_addr: u32

Section virtual addr at execution

sh_offset: u32

Section file offset

sh_size: u32

Section size in bytes

sh_link: u32

Link to another section

sh_info: u32

Additional section information

sh_addralign: u32

Section alignment

sh_entsize: u32

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 Eq for SectionHeader[src]

impl Copy for SectionHeader[src]

impl PartialEq<SectionHeader> for SectionHeader[src]

impl Clone for SectionHeader[src]

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

Performs copy-assignment from source. Read more

impl Default for SectionHeader[src]

impl From<SectionHeader> for ElfSectionHeader[src]

impl From<SectionHeader> for SectionHeader[src]

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]

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.