[][src]Struct goblin::mach::segment::Section

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,
}

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

Methods

impl Section[src]

pub fn name(&self) -> Result<&str>[src]

The name of this section

pub fn segname(&self) -> Result<&str>[src]

The containing segment's name

Important traits for RelocationIterator<'a>
pub fn iter_relocations<'b>(
    &self,
    data: &'b [u8],
    ctx: Ctx
) -> RelocationIterator<'b>
[src]

Iterate this sections relocations given data; data must be the original binary

Trait Implementations

impl Default for Section[src]

impl From<Section> for Section64[src]

impl From<Section> for Section32[src]

impl From<Section32> for Section[src]

impl From<Section64> for Section[src]

impl Debug for Section[src]

impl<'a> TryFromCtx<'a, Ctx, [u8]> for Section[src]

type Error = Error

type Size = usize

impl IntoCtx<Ctx, [u8]> for Section[src]

impl TryIntoCtx<Ctx, [u8]> for Section[src]

type Error = Error

type Size = usize

impl SizeWith<Ctx> for Section[src]

type Units = usize

Auto Trait Implementations

impl Send for Section

impl Unpin for Section

impl Sync for Section

impl UnwindSafe for Section

impl RefUnwindSafe for Section

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]