Skip to main content

patch_precode_target

Function patch_precode_target 

Source
pub unsafe fn patch_precode_target(
    precode_addr: usize,
    new_target: usize,
) -> Result<(), JitError>
Available on x86-64 only.
Expand description

Rewrite an indirect-jump precode’s target pointer to redirect the method.

§Safety

precode_addr must point to a jmp qword ptr [slot] instruction whose pointer slot is writable (or has been made writable), with at least 16 readable bytes at the instruction.