pub enum RelocationKind {
Relative,
AbsToRel,
RelToAbs,
Absolute,
}Expand description
Enum that specifies if/how relocations should be adapted if the assembling buffer is moved
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
Absolute
An absolute relocation to an absolute address This isn’t particularly useful, but the user can specify it sometimes
Trait Implementations§
Source§impl Clone for RelocationKind
impl Clone for RelocationKind
Source§fn clone(&self) -> RelocationKind
fn clone(&self) -> RelocationKind
Returns a duplicate 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
impl Copy for RelocationKind
Auto Trait Implementations§
impl Freeze for RelocationKind
impl RefUnwindSafe for RelocationKind
impl Send for RelocationKind
impl Sync for RelocationKind
impl Unpin for RelocationKind
impl UnwindSafe for RelocationKind
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