From 1b89e7f8ade270a81e672c6f2de079bdee336741 Mon Sep 17 00:00:00 2001 From: Zeex Date: Sun, 24 Jul 2016 04:56:04 +0600 Subject: Return support for 32-bit jumps on x86-64 Add an option to allow the caller to decide whether to use 32-bit or 64-bit jumps (the latter requires almost 3 times more space (5 vs 14 bytes)). Also see: #13 --- subhook_private.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'subhook_private.h') diff --git a/subhook_private.h b/subhook_private.h index 142cae6..768cf2f 100644 --- a/subhook_private.h +++ b/subhook_private.h @@ -32,8 +32,12 @@ struct subhook { int installed; void *src; void *dst; + subhook_options_t options; void *code; void *trampoline; + size_t jmp_size; + size_t trampoline_size; + size_t trampoline_len; }; void *subhook_unprotect(void *address, size_t size); -- cgit v1.1