[−][src]Trait object::read::macho::Section
A trait for generic access to Section32 and Section64.
Associated Types
Loading content...Required methods
pub fn sectname(&self) -> &[u8; 16][src]
pub fn segname(&self) -> &[u8; 16][src]
pub fn addr(&self, endian: Self::Endian) -> Self::Word[src]
pub fn size(&self, endian: Self::Endian) -> Self::Word[src]
pub fn offset(&self, endian: Self::Endian) -> u32[src]
pub fn align(&self, endian: Self::Endian) -> u32[src]
pub fn reloff(&self, endian: Self::Endian) -> u32[src]
pub fn nreloc(&self, endian: Self::Endian) -> u32[src]
pub fn flags(&self, endian: Self::Endian) -> u32[src]
Provided methods
pub fn name(&self) -> &[u8][src]
Return the sectname bytes up until the null terminator.
pub fn segment_name(&self) -> &[u8][src]
Return the segname bytes up until the null terminator.
pub fn file_range(&self, endian: Self::Endian) -> Option<(u64, u64)>[src]
Return the offset and size of the section in the file.
Returns None for sections that have no data in the file.
pub fn data<'data>(
&self,
endian: Self::Endian,
data: Bytes<'data>
) -> Result<Bytes<'data>, ()>[src]
&self,
endian: Self::Endian,
data: Bytes<'data>
) -> Result<Bytes<'data>, ()>
Return the section data.
Returns Ok(&[]) if the section has no data.
Returns Err for invalid values.
pub fn relocations<'data>(
&self,
endian: Self::Endian,
data: Bytes<'data>
) -> Result<&'data [Relocation<Self::Endian>]>[src]
&self,
endian: Self::Endian,
data: Bytes<'data>
) -> Result<&'data [Relocation<Self::Endian>]>
Return the relocation array.
Returns Err for invalid values.