pub struct SectionHeader {
pub name_index: u32,
pub type: SectionType,
pub flags: SectionFlags,
pub addr: u64,
pub offset: u64,
pub size: u64,
pub link: u32,
pub info: u32,
pub addralign: u64,
pub entsize: u64,
}Expand description
A parsed ELF section header with address fields widened to 64 bits.
Fields§
§name_index: u32The section name as a string-table offset.
type: SectionTypeThe section type.
flags: SectionFlagsThe section attribute flags.
addr: u64The virtual address of the section during execution.
offset: u64The file offset of the section bytes.
size: u64The section size in bytes.
link: u32A section-type-specific link to another section.
info: u32Section-type-specific extra information.
addralign: u64The required alignment of the section.
entsize: u64The size of one fixed-size entry, or zero.
Implementations§
Source§impl SectionHeader
impl SectionHeader
Sourcepub const fn size(class: ElfClass) -> u64
pub const fn size(class: ElfClass) -> u64
Returns the serialized size of a section header for class.
Sourcepub fn parse<R: ReadAt>(
reader: &R,
offset: u64,
endian: Endian,
class: ElfClass,
) -> Result<Self>
pub fn parse<R: ReadAt>( reader: &R, offset: u64, endian: Endian, class: ElfClass, ) -> Result<Self>
Parses one section header at offset.
§Errors
Returns crate::Error when the source cannot supply the header.
Trait Implementations§
Source§impl Clone for SectionHeader
impl Clone for SectionHeader
impl Copy for SectionHeader
Source§impl Debug for SectionHeader
impl Debug for SectionHeader
impl Eq for SectionHeader
Source§impl PartialEq for SectionHeader
impl PartialEq for SectionHeader
impl StructuralPartialEq for SectionHeader
Auto Trait Implementations§
impl Forget for SectionHeader
impl Freeze for SectionHeader
impl Move for SectionHeader
impl RefUnwindSafe for SectionHeader
impl Send for SectionHeader
impl Sync for SectionHeader
impl Unpin for SectionHeader
impl UnsafeUnpin for SectionHeader
impl UnwindSafe for SectionHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more