pub struct Section {
pub name: String,
pub section_type: SectionType,
pub flags: u32,
pub addr: u32,
pub data: Vec<u8>,
pub align: u32,
pub explicit_size: Option<u32>,
}Expand description
ELF section
Fields§
§name: StringSection name (index into string table)
section_type: SectionTypeSection type
flags: u32Section flags
addr: u32Virtual address
data: Vec<u8>Section data
align: u32Alignment
explicit_size: Option<u32>Explicit size (for NoBits sections like .bss where data is empty)
Implementations§
Source§impl Section
impl Section
Sourcepub fn new(name: &str, section_type: SectionType) -> Self
pub fn new(name: &str, section_type: SectionType) -> Self
Create a new section
Sourcepub fn with_flags(self, flags: u32) -> Self
pub fn with_flags(self, flags: u32) -> Self
Set flags
Sourcepub fn with_align(self, align: u32) -> Self
pub fn with_align(self, align: u32) -> Self
Set alignment
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Section
impl RefUnwindSafe for Section
impl Send for Section
impl Sync for Section
impl Unpin for Section
impl UnsafeUnpin for Section
impl UnwindSafe for Section
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