pub struct X86;Expand description
x86 (32-bit) architecture
Trait Implementations§
Source§impl Architecture for X86
impl Architecture for X86
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 = 6usize
const JMP_ABS_SIZE: usize = 6usize
size of an absolute jump stub (varies by architecture)
Source§const CODE_ALIGNMENT: usize = 4usize
const CODE_ALIGNMENT: usize = 4usize
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 X86
impl RefUnwindSafe for X86
impl Send for X86
impl Sync for X86
impl Unpin for X86
impl UnwindSafe for X86
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