Struct goblin::mach::relocation::RelocationInfo
source · #[repr(C)]pub struct RelocationInfo {
pub r_address: i32,
pub r_info: u32,
}
Fields§
§r_address: i32
Offset in the section to what is being relocated
r_info: u32
Contains all of the relocation info as a bitfield. r_symbolnum, 24 bits, r_pcrel 1 bit, r_length 2 bits, r_extern 1 bit, r_type 4 bits
Implementations§
source§impl RelocationInfo
impl RelocationInfo
sourcepub fn r_symbolnum(self) -> usize
pub fn r_symbolnum(self) -> usize
Symbol index if r_extern
== 1 or section ordinal if r_extern
== 0. In bits :24
sourcepub fn r_length(self) -> u8
pub fn r_length(self) -> u8
The length of the relocation, 0=byte, 1=word, 2=long, 3=quad, 2 bits
Trait Implementations§
source§impl Clone for RelocationInfo
impl Clone for RelocationInfo
source§fn clone(&self) -> RelocationInfo
fn clone(&self) -> RelocationInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RelocationInfo
impl Debug for RelocationInfo
source§impl<'a> IntoCtx<Endian> for &'a RelocationInfo
impl<'a> IntoCtx<Endian> for &'a RelocationInfo
source§impl<'a> TryFromCtx<'a, Endian> for RelocationInfowhere
RelocationInfo: 'a,
impl<'a> TryFromCtx<'a, Endian> for RelocationInfowhere RelocationInfo: 'a,
source§impl<'a> TryIntoCtx<Endian> for &'a RelocationInfo
impl<'a> TryIntoCtx<Endian> for &'a RelocationInfo
source§impl TryIntoCtx<Endian> for RelocationInfo
impl TryIntoCtx<Endian> for RelocationInfo
impl Copy for RelocationInfo
Auto Trait Implementations§
impl RefUnwindSafe for RelocationInfo
impl Send for RelocationInfo
impl Sync for RelocationInfo
impl Unpin for RelocationInfo
impl UnwindSafe for RelocationInfo
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