Struct goblin::elf::section_header::SectionHeader
[−]
[src]
pub struct SectionHeader { pub sh_name: usize, 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, }
A unified SectionHeader - convertable to and from 32-bit and 64-bit variants
Fields
sh_name: usize
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]
fn new() -> Self
fn parse<S: AsRef<[u8]>>(buffer: &S,
offset: usize,
count: usize,
ctx: Ctx)
-> Result<Vec<SectionHeader>>
offset: usize,
count: usize,
ctx: Ctx)
-> Result<Vec<SectionHeader>>
Trait Implementations
impl From<SectionHeader> for ElfSectionHeader
[src]
fn from(sh: SectionHeader) -> Self
Performs the conversion.
impl From<SectionHeader> for ElfSectionHeader
[src]
fn from(sh: SectionHeader) -> Self
Performs the conversion.
impl Default for SectionHeader
[src]
fn default() -> SectionHeader
Returns the "default value" for a type. Read more
impl PartialEq for SectionHeader
[src]
fn eq(&self, __arg_0: &SectionHeader) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SectionHeader) -> bool
This method tests for !=
.
impl Clone for SectionHeader
[src]
fn clone(&self) -> SectionHeader
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for SectionHeader
[src]
impl SizeWith<Ctx> for SectionHeader
[src]
impl<'a> TryFromCtx<'a, (usize, Ctx)> for SectionHeader
[src]
type Error = Error
fn try_from_ctx(buffer: &'a [u8],
(offset, Ctx { container: container, le: le }): (usize, Ctx))
-> Result<Self, Self::Error>
(offset, Ctx { container: container, le: le }): (usize, Ctx))
-> Result<Self, Self::Error>