pub enum RelocKind {
Branch26,
Page21,
PageOff12 {
scale: u8,
},
GotPage21,
GotPageOff12,
Rel32,
GotRel32,
Abs64,
}Expand description
Normalized relocation kinds across Mach-O / ELF / COFF, for the two architectures the JIT targets.
Variants§
Branch26
aarch64 b/bl imm26 (±128 MiB, 4-byte aligned).
Page21
aarch64 adrp hi21 page, direct.
PageOff12
aarch64 add/ldr lo12, direct. scale is the access-size shift the
patcher must apply (0 for add, 3 for 8-byte ldr).
GotPage21
aarch64 adrp hi21 page → GOT slot.
GotPageOff12
aarch64 ldr lo12 → GOT slot (8-byte scaled).
Rel32
x86-64 rip-relative disp32 (jmp/call/lea/mov).
GotRel32
x86-64 rip-relative disp32 → GOT/IAT slot.
Abs64
8-byte absolute address, little-endian.
Trait Implementations§
impl Copy for RelocKind
impl Eq for RelocKind
impl StructuralPartialEq for RelocKind
Auto Trait Implementations§
impl Freeze for RelocKind
impl RefUnwindSafe for RelocKind
impl Send for RelocKind
impl Sync for RelocKind
impl Unpin for RelocKind
impl UnsafeUnpin for RelocKind
impl UnwindSafe for RelocKind
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