Struct SectionHeader

Source
#[repr(C)]
pub struct SectionHeader<Addr: Copy> { pub name_table_offset: u32, pub section_type: SectionType, pub flags_raw: Addr, pub virtual_addr: Addr, pub file_offset: Addr, pub file_size: Addr, pub associated_section_index: u32, pub extra_info: u32, pub alignment: Addr, pub entry_size: Addr, }
Expand description

Header that controls linking

Fields§

§name_table_offset: u32

Offset within the names section to the start of this section’s name.

§section_type: SectionType

Indicates the contents/meaning of the section described by this header.

§flags_raw: Addr

Flags for various attributes of this section.

This is the raw numeric value of the flags. Use the flags accessor to view as a SectionFlags type.

§virtual_addr: Addr

Virtual address where this section should be loaded in memory, if applicable.

§file_offset: Addr

File offset to the start of this section’s data.

§file_size: Addr

Size in bytes of this section’s file data.

§associated_section_index: u32

Depending on the section_type, this may identify another related section.

§extra_info: u32

Additional flags that depend on the section_type.

§alignment: Addr

Required alignment of the section in bytes.

§entry_size: Addr

Depending on the section_type, this may identify the size of individual data entries within the section.

Implementations§

Source§

impl<Addr> SectionHeader<Addr>

Source

pub fn flags(&self) -> SectionFlags

Flags for various attributes of this section.

Source

pub fn set_flags(&mut self, flags: SectionFlags)

Flags for various attributes of this section.

Trait Implementations§

Source§

impl<Addr: Clone + Copy> Clone for SectionHeader<Addr>

Source§

fn clone(&self) -> SectionHeader<Addr>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Addr: Debug + Copy> Debug for SectionHeader<Addr>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Addr: Default + Copy> Default for SectionHeader<Addr>

Source§

fn default() -> SectionHeader<Addr>

Returns the “default value” for a type. Read more
Source§

impl<Addr: PartialEq + Copy> PartialEq for SectionHeader<Addr>

Source§

fn eq(&self, other: &SectionHeader<Addr>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Addr: Copy + Copy> Copy for SectionHeader<Addr>

Source§

impl<Addr: Eq + Copy> Eq for SectionHeader<Addr>

Source§

impl<Addr: Copy> StructuralPartialEq for SectionHeader<Addr>

Auto Trait Implementations§

§

impl<Addr> Freeze for SectionHeader<Addr>
where Addr: Freeze,

§

impl<Addr> RefUnwindSafe for SectionHeader<Addr>
where Addr: RefUnwindSafe,

§

impl<Addr> Send for SectionHeader<Addr>
where Addr: Send,

§

impl<Addr> Sync for SectionHeader<Addr>
where Addr: Sync,

§

impl<Addr> Unpin for SectionHeader<Addr>
where Addr: Unpin,

§

impl<Addr> UnwindSafe for SectionHeader<Addr>
where Addr: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.