Struct goblin::mach::relocation::RelocationInfo [−][src]
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
impl RelocationInfo
[src]
pub fn r_symbolnum(self) -> usize
[src]
Symbol index if r_extern
== 1 or section ordinal if r_extern
== 0. In bits :24
pub fn r_pcrel(self) -> u8
[src]
Was relocated pc relative already, 1 bit
pub fn r_length(self) -> u8
[src]
The length of the relocation, 0=byte, 1=word, 2=long, 3=quad, 2 bits
pub fn r_extern(self) -> u8
[src]
Does not include value of sym referenced, 1 bit
pub fn r_type(self) -> u8
[src]
Ff not 0, machine specific relocation type, in bits :4
pub fn is_extern(self) -> bool
[src]
If true, this relocation is for a symbol; if false, or a section ordinal otherwise
pub fn is_pic(self) -> bool
[src]
If true, this is a PIC relocation
pub fn to_str(self, cputype: CpuType) -> &'static str
[src]
Returns a string representation of this relocation, given the machine cputype
Trait Implementations
impl Clone for RelocationInfo
[src]
fn clone(&self) -> RelocationInfo
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for RelocationInfo
[src]
impl Debug for RelocationInfo
[src]
impl FromCtx<Endian, [u8]> for RelocationInfo
[src]
impl<'a> IntoCtx<Endian, [u8]> for &'a RelocationInfo
[src]
impl IntoCtx<Endian, [u8]> for RelocationInfo
[src]
impl SizeWith<Endian> for RelocationInfo
[src]
impl<'a> TryFromCtx<'a, Endian, [u8]> for RelocationInfo where
RelocationInfo: 'a,
[src]
RelocationInfo: 'a,
type Error = Error
fn try_from_ctx(
src: &'a [u8],
ctx: Endian
) -> Result<(Self, usize), Self::Error>
[src]
src: &'a [u8],
ctx: Endian
) -> Result<(Self, usize), Self::Error>
impl<'a> TryIntoCtx<Endian, [u8]> for &'a RelocationInfo
[src]
type Error = Error
fn try_into_ctx(self, dst: &mut [u8], ctx: Endian) -> Result<usize, Self::Error>
[src]
impl TryIntoCtx<Endian, [u8]> for RelocationInfo
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,