Enum dynasmrt::relocations::RelocationKind
source · [−]pub enum RelocationKind {
Relative,
AbsToRel,
RelToAbs,
}
Expand description
Specifies what kind of relocation a relocation is.
Variants
Relative
A simple, PC-relative relocation. These can be encoded once and do not need to be adjusted when the executable buffer is moved.
AbsToRel
An absolute relocation to a relative address, i.e. trying to put the address of a dynasm x86 function in a register This means adjustment is necessary when the executable buffer is moved
RelToAbs
A relative relocation to an absolute address, i.e. trying to call a rust function with a dynasm x86 call. This means adjustment is necessary when the executable buffer is moved
Implementations
sourceimpl RelocationKind
impl RelocationKind
sourcepub fn from_encoding(encoding: u8) -> Self
pub fn from_encoding(encoding: u8) -> Self
Converts back from numeric value to RelocationKind
Trait Implementations
sourceimpl Clone for RelocationKind
impl Clone for RelocationKind
sourcefn clone(&self) -> RelocationKind
fn clone(&self) -> RelocationKind
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for RelocationKind
impl Debug for RelocationKind
sourceimpl Hash for RelocationKind
impl Hash for RelocationKind
sourceimpl PartialEq<RelocationKind> for RelocationKind
impl PartialEq<RelocationKind> for RelocationKind
sourcefn eq(&self, other: &RelocationKind) -> bool
fn eq(&self, other: &RelocationKind) -> bool
impl Copy for RelocationKind
impl Eq for RelocationKind
impl StructuralEq for RelocationKind
impl StructuralPartialEq for RelocationKind
Auto Trait Implementations
impl RefUnwindSafe for RelocationKind
impl Send for RelocationKind
impl Sync for RelocationKind
impl Unpin for RelocationKind
impl UnwindSafe for RelocationKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more