Skip to main content

patch

Function patch 

Source
pub fn patch(entry_addr: usize, func: usize) -> Result<usize, PatchError>
Expand description

Attempts to patch plt entry at entry_addr. Sets page protections containing entry_addr to PROT_WRITE | PROT_EXEC before replacing the pointer. After writing out reverts the page to solely PROT_READ. Returns the previous value contained in the entry_addr prior to patching.