Struct goblin::elf::section_header::section_header32::SectionHeader
source · [−]#[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,
}
Expand description
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
Implementations
sourceimpl SectionHeader
impl SectionHeader
Trait Implementations
sourceimpl Clone for SectionHeader
impl Clone for SectionHeader
sourcefn clone(&self) -> SectionHeader
fn clone(&self) -> SectionHeader
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SectionHeader
impl Debug for SectionHeader
sourceimpl Default for SectionHeader
impl Default for SectionHeader
sourcefn default() -> SectionHeader
fn default() -> SectionHeader
Returns the “default value” for a type. Read more
sourceimpl From<SectionHeader> for ElfSectionHeader
impl From<SectionHeader> for ElfSectionHeader
sourcefn from(sh: SectionHeader) -> Self
fn from(sh: SectionHeader) -> Self
Performs the conversion.
sourceimpl From<SectionHeader> for SectionHeader
impl From<SectionHeader> for SectionHeader
sourcefn from(sh: ElfSectionHeader) -> Self
fn from(sh: ElfSectionHeader) -> Self
Performs the conversion.
sourceimpl PartialEq<SectionHeader> for SectionHeader
impl PartialEq<SectionHeader> for SectionHeader
sourcefn eq(&self, other: &SectionHeader) -> bool
fn eq(&self, other: &SectionHeader) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SectionHeader) -> bool
fn ne(&self, other: &SectionHeader) -> bool
This method tests for !=
.
sourceimpl Plain for SectionHeader
impl Plain for SectionHeader
fn from_bytes(bytes: &[u8]) -> Result<&Self, Error>
fn slice_from_bytes(bytes: &[u8]) -> Result<&[Self], Error>
fn slice_from_bytes_len(bytes: &[u8], len: usize) -> Result<&[Self], Error>
fn from_mut_bytes(bytes: &mut [u8]) -> Result<&mut Self, Error>
fn slice_from_mut_bytes(bytes: &mut [u8]) -> Result<&mut [Self], Error>
fn slice_from_mut_bytes_len(
bytes: &mut [u8],
len: usize
) -> Result<&mut [Self], Error>
fn copy_from_bytes(&mut self, bytes: &[u8]) -> Result<(), Error>
sourceimpl<'a> TryFromCtx<'a, Endian, [u8]> for SectionHeader where
SectionHeader: 'a,
impl<'a> TryFromCtx<'a, Endian, [u8]> for SectionHeader where
SectionHeader: 'a,
sourceimpl<'a> TryIntoCtx<Endian, [u8]> for &'a SectionHeader
impl<'a> TryIntoCtx<Endian, [u8]> for &'a SectionHeader
sourceimpl TryIntoCtx<Endian, [u8]> for SectionHeader
impl TryIntoCtx<Endian, [u8]> for SectionHeader
impl Copy for SectionHeader
impl Eq for SectionHeader
impl StructuralEq for SectionHeader
impl StructuralPartialEq for SectionHeader
Auto Trait Implementations
impl RefUnwindSafe for SectionHeader
impl Send for SectionHeader
impl Sync for SectionHeader
impl Unpin for SectionHeader
impl UnwindSafe for SectionHeader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more