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§
source§impl 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§
source§impl Clone for RelocationKind
impl Clone for RelocationKind
source§fn clone(&self) -> RelocationKind
fn clone(&self) -> RelocationKind
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 RelocationKind
impl Debug for RelocationKind
source§impl Hash for RelocationKind
impl Hash for RelocationKind
source§impl PartialEq<RelocationKind> for RelocationKind
impl PartialEq<RelocationKind> for RelocationKind
source§fn eq(&self, other: &RelocationKind) -> bool
fn eq(&self, other: &RelocationKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.