pub struct Section<'a> {
pub flags: SectionFlags,
/* private fields */
}
Expand description
A section in an object file.
Fields§
§flags: SectionFlags
Section flags that are specific to each file format.
Implementations§
source§impl<'a> Section<'a>
impl<'a> Section<'a>
sourcepub fn set_data<T>(&mut self, data: T, align: u64)
pub fn set_data<T>(&mut self, data: T, align: u64)
Set the data for a section.
Must not be called for sections that already have data, or that contain uninitialized data.
align
must be a power of two.
sourcepub fn append_data(&mut self, append_data: &[u8], align: u64) -> u64
pub fn append_data(&mut self, append_data: &[u8], align: u64) -> u64
Append data to a section.
Must not be called for sections that contain uninitialized data.
align
must be a power of two.
sourcepub fn append_bss(&mut self, size: u64, align: u64) -> u64
pub fn append_bss(&mut self, size: u64, align: u64) -> u64
Append uninitialized data to a section.
Must not be called for sections that contain initialized data.
align
must be a power of two.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Section<'a>
impl<'a> RefUnwindSafe for Section<'a>
impl<'a> Send for Section<'a>
impl<'a> Sync for Section<'a>
impl<'a> Unpin for Section<'a>
impl<'a> UnwindSafe for Section<'a>
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