Struct Relocation

struct Relocation { ... }

A relocation entry.

Returned by Object::dynamic_relocations or ObjectSection::relocations.

Implementations

impl Relocation

fn kind(self: &Self) -> RelocationKind

The operation used to calculate the result of the relocation.

fn encoding(self: &Self) -> RelocationEncoding

Information about how the result of the relocation operation is encoded in the place.

fn size(self: &Self) -> u8

The size in bits of the place of the relocation.

If 0, then the size is determined by the relocation kind.

fn target(self: &Self) -> RelocationTarget

The target of the relocation.

fn addend(self: &Self) -> i64

The addend to use in the relocation calculation.

fn set_addend(self: &mut Self, addend: i64)

Set the addend to use in the relocation calculation.

fn has_implicit_addend(self: &Self) -> bool

Returns true if there is an implicit addend stored in the data at the offset to be relocated.

fn flags(self: &Self) -> RelocationFlags

Relocation flags that are specific to each file format.

The values returned by kind, encoding and size are derived from these flags.

impl Debug for Relocation

fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result

impl Freeze for Relocation

impl RefUnwindSafe for Relocation

impl Send for Relocation

impl Sync for Relocation

impl Unpin for Relocation

impl UnwindSafe for Relocation

impl<T> Any for Relocation

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Relocation

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Relocation

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for Relocation

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for Relocation

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Relocation

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Relocation

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>