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§
source§impl Section
impl Section
sourcepub fn iter_relocations<'b>(
&self,
data: &'b [u8],
ctx: Ctx
) -> RelocationIterator<'b> ⓘ
pub fn iter_relocations<'b>( &self, data: &'b [u8], ctx: Ctx ) -> RelocationIterator<'b> ⓘ
Iterate this sections relocations given data
; data
must be the original binary
Trait Implementations§
source§impl<'a> TryFromCtx<'a, Ctx> for Section
impl<'a> TryFromCtx<'a, Ctx> for Section
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§
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