#[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>
impl<Addr> SectionHeader<Addr>
Sourcepub fn flags(&self) -> SectionFlags
pub fn flags(&self) -> SectionFlags
Flags for various attributes of this section.
Sourcepub fn set_flags(&mut self, flags: SectionFlags)
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>
impl<Addr: Clone + Copy> Clone for SectionHeader<Addr>
Source§fn clone(&self) -> SectionHeader<Addr>
fn clone(&self) -> SectionHeader<Addr>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more