diff options
author | comex | 2015-01-24 21:59:37 -0500 |
---|---|---|
committer | comex | 2015-01-24 21:59:37 -0500 |
commit | 98afb15eaa8f8c31bf5763de0e3c83a845414b0a (patch) | |
tree | e603aae961ead4e596fc994ed06df884eaee7b9a /lib/arm/misc.h | |
parent | Add function to deal with mprotecting RW and back. A bit more complex than t... (diff) | |
download | substitute-98afb15eaa8f8c31bf5763de0e3c83a845414b0a.tar.gz |
...
Diffstat (limited to 'lib/arm/misc.h')
-rw-r--r-- | lib/arm/misc.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/arm/misc.h b/lib/arm/misc.h index 047be2d..3dc9633 100644 --- a/lib/arm/misc.h +++ b/lib/arm/misc.h @@ -1,6 +1,7 @@ #pragma once #define TARGET_DIS_SUPPORTED #define TARGET_DIS_HEADER "arm/dis-arm-multi.inc.h" +#define TARGET_JUMP_PATCH_HDR "arm/jump-patch.h" #define TARGET_TRANSFORM_DIS_HEADER "arm/transform-dis-arm-multi.inc.h" #define MIN_INSN_SIZE 2 struct arch_dis_ctx { @@ -8,3 +9,9 @@ struct arch_dis_ctx { bool pc_low_bit; }; enum { IS_LDRD_STRD = 1 << 16 }; + +#define JUMP_PATCH_SIZE 8 +#define MAX_REWRITTEN_SIZE (12 * 4) /* actually should be less */ +static inline bool can_reach_with_jump_patch(uintptr_t pc, uintptr_t dpc) { + return true; +} |