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)where
T: Into<Cow<'a, [u8]>>,
pub fn set_data<T>(&mut self, data: T, align: u64)where
T: Into<Cow<'a, [u8]>>,
Set the data for a section.
Must not be called for sections that already have data, or that contain uninitialized data.
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.
sourcepub fn append_bss(&mut self, size: u64, align: u64) -> u64
pub fn append_bss(&mut self, size: u64, align: u64) -> u64
Append unitialized data to a section.
Must not be called for sections that contain initialized data.