pub struct Section {
pub sectname: [u8; 16],
pub segname: [u8; 16],
pub addr: u64,
pub size: u64,
pub offset: u32,
pub align: u32,
pub reloff: u32,
pub nreloc: u32,
pub flags: u32,
}
Expand description
Generalized 32/64 bit Section
Fields
sectname: [u8; 16]
name of this section
segname: [u8; 16]
segment this section goes in
addr: u64
memory address of this section
size: u64
size in bytes of this section
offset: u32
file offset of this section
align: u32
section alignment (power of 2)
reloff: u32
file offset of relocation entries
nreloc: u32
number of relocation entries
flags: u32
flags (section type and attributes
Implementations
sourceimpl Section
impl Section
sourcepub fn iter_relocations<'b>(
&self,
data: &'b [u8],
ctx: Ctx
) -> RelocationIterator<'b>ⓘNotable traits for RelocationIterator<'a>impl<'a> Iterator for RelocationIterator<'a> type Item = Result<RelocationInfo>;
pub fn iter_relocations<'b>(
&self,
data: &'b [u8],
ctx: Ctx
) -> RelocationIterator<'b>ⓘNotable traits for RelocationIterator<'a>impl<'a> Iterator for RelocationIterator<'a> type Item = Result<RelocationInfo>;
Iterate this sections relocations given data
; data
must be the original binary
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Section
impl Send for Section
impl Sync for Section
impl Unpin for Section
impl UnwindSafe for Section
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more