aboutsummaryrefslogtreecommitdiff
path: root/lib/arm/misc.h
diff options
context:
space:
mode:
authorcomex2015-01-24 21:59:37 -0500
committercomex2015-01-24 21:59:37 -0500
commit98afb15eaa8f8c31bf5763de0e3c83a845414b0a (patch)
treee603aae961ead4e596fc994ed06df884eaee7b9a /lib/arm/misc.h
parentAdd function to deal with mprotecting RW and back. A bit more complex than t... (diff)
downloadsubstitute-98afb15eaa8f8c31bf5763de0e3c83a845414b0a.tar.gz
...
Diffstat (limited to 'lib/arm/misc.h')
-rw-r--r--lib/arm/misc.h7
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;
+}