pub struct X64;Expand description
x86_64 (64-bit) architecture
Trait Implementations§
Source§impl Architecture for X64
impl Architecture for X64
Source§const JMP_REL_SIZE: usize = 5usize
const JMP_REL_SIZE: usize = 5usize
size of a near relative jump instruction (jmp rel32)
Source§const JMP_ABS_SIZE: usize = 14usize
const JMP_ABS_SIZE: usize = 14usize
size of an absolute jump stub (varies by architecture)
Source§const CODE_ALIGNMENT: usize = 16usize
const CODE_ALIGNMENT: usize = 16usize
required alignment for executable code
Source§const MIN_HOOK_SIZE: usize = 5usize
const MIN_HOOK_SIZE: usize = 5usize
minimum bytes needed to install a hook
typically JMP_REL_SIZE for near targets, JMP_ABS_SIZE for far
Source§fn encode_jmp_rel(source: usize, target: usize) -> Option<Vec<u8>>
fn encode_jmp_rel(source: usize, target: usize) -> Option<Vec<u8>>
encode a near relative jump from source to target Read more
Source§fn encode_jmp_abs(target: usize) -> Vec<u8> ⓘ
fn encode_jmp_abs(target: usize) -> Vec<u8> ⓘ
encode an absolute jump (architecture-specific stub)
Source§fn encode_call_rel(source: usize, target: usize) -> Option<Vec<u8>>
fn encode_call_rel(source: usize, target: usize) -> Option<Vec<u8>>
encode a relative call instruction Read more
Source§fn find_instruction_boundary(code: &[u8], required_size: usize) -> Option<usize>
fn find_instruction_boundary(code: &[u8], required_size: usize) -> Option<usize>
find instruction boundary at or after required_size bytes Read more
Source§fn relocate_instruction(
instruction: &[u8],
old_address: usize,
new_address: usize,
) -> Option<Vec<u8>>
fn relocate_instruction( instruction: &[u8], old_address: usize, new_address: usize, ) -> Option<Vec<u8>>
relocate an instruction that was moved to a new address Read more
Source§fn needs_relocation(instruction: &[u8]) -> bool
fn needs_relocation(instruction: &[u8]) -> bool
check if an instruction needs relocation when moved
Auto Trait Implementations§
impl Freeze for X64
impl RefUnwindSafe for X64
impl Send for X64
impl Sync for X64
impl Unpin for X64
impl UnwindSafe for X64
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