Struct object::elf::SectionHeader64
source · [−]#[repr(C)]pub struct SectionHeader64<E: Endian> {
pub sh_name: U32<E>,
pub sh_type: U32<E>,
pub sh_flags: U64<E>,
pub sh_addr: U64<E>,
pub sh_offset: U64<E>,
pub sh_size: U64<E>,
pub sh_link: U32<E>,
pub sh_info: U32<E>,
pub sh_addralign: U64<E>,
pub sh_entsize: U64<E>,
}
Expand description
Section header.
Fields
sh_name: U32<E>
Section name.
This is an offset into the section header string table.
sh_type: U32<E>
Section type. One of the SHT_*
constants.
sh_flags: U64<E>
Section flags. A combination of the SHF_*
constants.
sh_addr: U64<E>
Section virtual address at execution.
sh_offset: U64<E>
Section file offset.
sh_size: U64<E>
Section size in bytes.
sh_link: U32<E>
Link to another section.
The section relationship depends on the sh_type
value.
sh_info: U32<E>
Additional section information.
The meaning of this field depends on the sh_type
value.
sh_addralign: U64<E>
Section alignment.
sh_entsize: U64<E>
Entry size if the section holds a table.
Trait Implementations
sourceimpl<E: Clone + Endian> Clone for SectionHeader64<E>
impl<E: Clone + Endian> Clone for SectionHeader64<E>
sourcefn clone(&self) -> SectionHeader64<E>
fn clone(&self) -> SectionHeader64<E>
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<E: Debug + Endian> Debug for SectionHeader64<E>
impl<E: Debug + Endian> Debug for SectionHeader64<E>
sourceimpl<Endian: Endian> SectionHeader for SectionHeader64<Endian>
impl<Endian: Endian> SectionHeader for SectionHeader64<Endian>
type Word = u64
type Endian = Endian
type Elf = FileHeader64<Endian>
fn sh_name(&self, endian: Self::Endian) -> u32
fn sh_type(&self, endian: Self::Endian) -> u32
fn sh_flags(&self, endian: Self::Endian) -> Self::Word
fn sh_addr(&self, endian: Self::Endian) -> Self::Word
fn sh_offset(&self, endian: Self::Endian) -> Self::Word
fn sh_size(&self, endian: Self::Endian) -> Self::Word
fn sh_link(&self, endian: Self::Endian) -> u32
fn sh_info(&self, endian: Self::Endian) -> u32
fn sh_addralign(&self, endian: Self::Endian) -> Self::Word
fn sh_entsize(&self, endian: Self::Endian) -> Self::Word
sourcefn name<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
strings: StringTable<'data, R>
) -> Result<&'data [u8]>
fn name<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
strings: StringTable<'data, R>
) -> Result<&'data [u8]>
Parse the section name from the string table.
sourcefn file_range(&self, endian: Self::Endian) -> Option<(u64, u64)>
fn file_range(&self, endian: Self::Endian) -> Option<(u64, u64)>
Return the offset and size of the section in the file. Read more
sourcefn data<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<&'data [u8]>
fn data<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<&'data [u8]>
Return the section data. Read more
sourcefn data_as_array<'data, T: Pod, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<&'data [T]>
fn data_as_array<'data, T: Pod, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<&'data [T]>
Return the section data as a slice of the given type. Read more
sourcefn symbols<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R,
sections: &SectionTable<'data, Self::Elf, R>,
section_index: usize
) -> Result<Option<SymbolTable<'data, Self::Elf, R>>>
fn symbols<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R,
sections: &SectionTable<'data, Self::Elf, R>,
section_index: usize
) -> Result<Option<SymbolTable<'data, Self::Elf, R>>>
Return the symbols in the section. Read more
sourcefn rel<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<&'data [<Self::Elf as FileHeader>::Rel]>>
fn rel<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<&'data [<Self::Elf as FileHeader>::Rel]>>
Return the Elf::Rel
entries in the section. Read more
sourcefn rela<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<&'data [<Self::Elf as FileHeader>::Rela]>>
fn rela<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<&'data [<Self::Elf as FileHeader>::Rela]>>
Return the Elf::Rela
entries in the section. Read more
sourcefn relocation_symbols<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R,
sections: &SectionTable<'data, Self::Elf, R>
) -> Result<SymbolTable<'data, Self::Elf, R>>
fn relocation_symbols<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R,
sections: &SectionTable<'data, Self::Elf, R>
) -> Result<SymbolTable<'data, Self::Elf, R>>
Return the symbol table for a relocation section. Read more
sourcefn notes<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<NoteIterator<'data, Self::Elf>>>
fn notes<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<NoteIterator<'data, Self::Elf>>>
Return a note iterator for the section data. Read more
sourcefn group<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<(u32, &'data [U32Bytes<Self::Endian>])>>
fn group<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<(u32, &'data [U32Bytes<Self::Endian>])>>
Return the contents of a group section. Read more
sourcefn hash_header<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<&'data HashHeader<Self::Endian>>>
fn hash_header<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<&'data HashHeader<Self::Endian>>>
Return the header of a SysV hash section. Read more
sourcefn hash<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<HashTable<'data, Self::Elf>>>
fn hash<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<HashTable<'data, Self::Elf>>>
Return the contents of a SysV hash section. Read more
sourcefn gnu_hash_header<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<&'data GnuHashHeader<Self::Endian>>>
fn gnu_hash_header<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<&'data GnuHashHeader<Self::Endian>>>
Return the header of a GNU hash section. Read more
sourcefn gnu_hash<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<GnuHashTable<'data, Self::Elf>>>
fn gnu_hash<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<GnuHashTable<'data, Self::Elf>>>
Return the contents of a GNU hash section. Read more
sourcefn gnu_versym<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<&'data [Versym<Self::Endian>]>>
fn gnu_versym<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<&'data [Versym<Self::Endian>]>>
Return the contents of a SHT_GNU_VERSYM
section. Read more
sourcefn gnu_verdef<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<VerdefIterator<'data, Self::Elf>>>
fn gnu_verdef<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<VerdefIterator<'data, Self::Elf>>>
Return an iterator for the entries of a SHT_GNU_VERDEF
section. Read more
sourcefn gnu_verneed<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<VerneedIterator<'data, Self::Elf>>>
fn gnu_verneed<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<Option<VerneedIterator<'data, Self::Elf>>>
Return an iterator for the entries of a SHT_GNU_VERNEED
section. Read more
impl<E: Copy + Endian> Copy for SectionHeader64<E>
impl<E: Endian> Pod for SectionHeader64<E>
Auto Trait Implementations
impl<E> RefUnwindSafe for SectionHeader64<E> where
E: RefUnwindSafe,
impl<E> Send for SectionHeader64<E> where
E: Send,
impl<E> Sync for SectionHeader64<E> where
E: Sync,
impl<E> Unpin for SectionHeader64<E> where
E: Unpin,
impl<E> UnwindSafe for SectionHeader64<E> where
E: UnwindSafe,
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