Struct multiboot2::ElfSection
source · pub struct ElfSection { /* private fields */ }
Expand description
A single generic ELF Section.
Implementations§
source§impl ElfSection
impl ElfSection
sourcepub fn section_type(&self) -> ElfSectionType
pub fn section_type(&self) -> ElfSectionType
Get the section type as a ElfSectionType
enum variant.
sourcepub fn section_type_raw(&self) -> u32
pub fn section_type_raw(&self) -> u32
Get the “raw” section type as a u32
sourcepub fn start_address(&self) -> u64
pub fn start_address(&self) -> u64
Get the physical start address of the section.
sourcepub fn end_address(&self) -> u64
pub fn end_address(&self) -> u64
Get the physical end address of the section.
This is the same as doing section.start_address() + section.size()
sourcepub fn addralign(&self) -> u64
pub fn addralign(&self) -> u64
Get the section’s address alignment constraints.
That is, the value of start_address
must be congruent to 0,
modulo the value of addrlign
. Currently, only 0 and positive
integral powers of two are allowed. Values 0 and 1 mean the section has no
alignment constraints.
sourcepub fn flags(&self) -> ElfSectionFlags
pub fn flags(&self) -> ElfSectionFlags
Get the section’s flags.
sourcepub fn is_allocated(&self) -> bool
pub fn is_allocated(&self) -> bool
Check if the ALLOCATED
flag is set in the section flags.
Trait Implementations§
source§impl Clone for ElfSection
impl Clone for ElfSection
source§fn clone(&self) -> ElfSection
fn clone(&self) -> ElfSection
Returns a copy of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ElfSection
impl Debug for ElfSection
source§impl Hash for ElfSection
impl Hash for ElfSection
source§impl Ord for ElfSection
impl Ord for ElfSection
source§impl PartialEq for ElfSection
impl PartialEq for ElfSection
source§impl PartialOrd for ElfSection
impl PartialOrd for ElfSection
impl Copy for ElfSection
impl Eq for ElfSection
impl StructuralEq for ElfSection
impl StructuralPartialEq for ElfSection
Auto Trait Implementations§
impl RefUnwindSafe for ElfSection
impl !Send for ElfSection
impl !Sync for ElfSection
impl Unpin for ElfSection
impl UnwindSafe for ElfSection
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
source§impl<T> TagTrait for Twhere
T: Pointee<Metadata = ()>,
impl<T> TagTrait for Twhere
T: Pointee<Metadata = ()>,
source§fn dst_size(_: &Tag) -> <T as Pointee>::Metadata
fn dst_size(_: &Tag) -> <T as Pointee>::Metadata
Returns the amount of items in the dynamically sized portion of the
DST. Note that this is not the amount of bytes. So if the dynamically
sized portion is 16 bytes in size and each element is 4 bytes big, then
this function must return 4.
source§unsafe fn from_base_tag<'a>(tag: &Tag) -> &'a Self
unsafe fn from_base_tag<'a>(tag: &Tag) -> &'a Self
Creates a reference to a (dynamically sized) tag type in a safe way.
DST tags need to implement a proper
Self::dst_size
implementation. Read more