Skip to content

Commit f5b0cb2

Browse files
committed
A64InlineHook for arm64 and Substrate for x86_64
Signed-off-by: tiann <[email protected]>
1 parent 8014765 commit f5b0cb2

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

VirtualApp/lib/src/main/jni/Foundation/IOUniformer.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
#include <stdlib.h>
66
#include <fb/include/fb/ALog.h>
77

8-
#ifdef __LP64__
9-
8+
#ifdef __aarch64__
109
#include "A64Inlinehook/And64InlineHook.hpp"
1110
#else
1211
#include <Substrate/SubstrateHook.h>
@@ -77,7 +76,7 @@ void IOUniformer::init_env_before_all() {
7776

7877
static inline void
7978
hook_function(void *addr, void *new_func, void **old_func) {
80-
#ifdef __LP64__
79+
#ifdef __aarch64__
8180
A64HookFunction(addr, new_func, old_func);
8281
#else
8382
MSHookFunction(addr, new_func, old_func);

VirtualApp/lib/src/main/jni/Substrate/SubstrateHook.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ static void SubstrateHookFunction(SubstrateProcessRef process, void *symbol, voi
924924
#endif
925925

926926
_extern void MSHookFunction(void *symbol, void *replace, void **result) {
927-
#ifndef __LP64__
927+
#ifndef __aarch64__
928928
SubstrateHookFunction(NULL, symbol, replace, result);
929929
#endif
930930
}

0 commit comments

Comments
 (0)