pub enum RelaxationKind {
NoOp,
ReplaceWithNop,
MovzX0Lsl16,
MovkX0,
MovzXnLsl16,
MovkXn,
AdrpToAdr,
AdrpX0,
LdrX0,
AddToAdr,
LdrToAdr,
}Variants§
NoOp
Leave the instruction alone. Used when we only want to change the kind of relocation used.
ReplaceWithNop
Replace with nop
MovzX0Lsl16
Replace with movz x0 lsl #16
MovkX0
Replace with movk x0
MovzXnLsl16
Replace with movz xn lsl #16
MovkXn
Replace with movk xn
AdrpToAdr
Replace adrp with adr
AdrpX0
Replace with adrp x0 with adr
LdrX0
Replace with ldr x0
AddToAdr
Replace add with adr. We don’t apply this, but lld does, so this is used by linker-diff.
LdrToAdr
Implementations§
Source§impl RelaxationKind
impl RelaxationKind
pub fn apply( self, section_bytes: &mut [u8], offset_in_section: &mut u64, _addend: &mut i64, )
pub fn next_modifier(&self) -> RelocationModifier
Trait Implementations§
Source§impl Clone for RelaxationKind
impl Clone for RelaxationKind
Source§fn clone(&self) -> RelaxationKind
fn clone(&self) -> RelaxationKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RelaxationKind
impl Debug for RelaxationKind
Source§impl PartialEq for RelaxationKind
impl PartialEq for RelaxationKind
Source§fn eq(&self, other: &RelaxationKind) -> bool
fn eq(&self, other: &RelaxationKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for RelaxationKind
impl Eq for RelaxationKind
impl StructuralPartialEq for RelaxationKind
Auto Trait Implementations§
impl Freeze for RelaxationKind
impl RefUnwindSafe for RelaxationKind
impl Send for RelaxationKind
impl Sync for RelaxationKind
impl Unpin for RelaxationKind
impl UnsafeUnpin for RelaxationKind
impl UnwindSafe for RelaxationKind
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