mirror of
https://github.com/LSPosed/LSPlant.git
synced 2025-05-05 05:56:38 +08:00
Fix trampoline
This commit is contained in:
parent
b60879e048
commit
a9c131e82a
@ -182,6 +182,7 @@ public:
|
|||||||
auto sdk_int = GetAndroidApiLevel();
|
auto sdk_int = GetAndroidApiLevel();
|
||||||
|
|
||||||
if (sdk_int < __ANDROID_API_R__) kAccPreCompiled = 0;
|
if (sdk_int < __ANDROID_API_R__) kAccPreCompiled = 0;
|
||||||
|
else if (sdk_int >= __ANDROID_API_S__) kAccPreCompiled = 0x00800000;
|
||||||
if (sdk_int < __ANDROID_API_Q__) kAccFastInterpreterToInterpreterInvoke = 0;
|
if (sdk_int < __ANDROID_API_Q__) kAccFastInterpreterToInterpreterInvoke = 0;
|
||||||
|
|
||||||
if (!RETRIEVE_FUNC_SYMBOL(GetMethodShorty,
|
if (!RETRIEVE_FUNC_SYMBOL(GetMethodShorty,
|
||||||
|
@ -42,7 +42,7 @@ inline consteval auto operator""_uarr() {
|
|||||||
|
|
||||||
consteval inline auto GetTrampoline() {
|
consteval inline auto GetTrampoline() {
|
||||||
if constexpr (kArch == Arch::kArm) {
|
if constexpr (kArch == Arch::kArm) {
|
||||||
return std::make_tuple("\x00\x00\x9f\xe5\x20\xf0\x90\xe5\x78\x56\x34\x12"_uarr,
|
return std::make_tuple("\x00\x00\x9f\xe5\x00\xf0\x90\xe5\x78\x56\x34\x12"_uarr,
|
||||||
// NOLINTNEXTLINE
|
// NOLINTNEXTLINE
|
||||||
uint8_t{32u}, uintptr_t{8u});
|
uint8_t{32u}, uintptr_t{8u});
|
||||||
}
|
}
|
||||||
@ -53,12 +53,12 @@ consteval inline auto GetTrampoline() {
|
|||||||
uint8_t{44u}, uintptr_t{12u});
|
uint8_t{44u}, uintptr_t{12u});
|
||||||
}
|
}
|
||||||
if constexpr (kArch == Arch::kX86) {
|
if constexpr (kArch == Arch::kX86) {
|
||||||
return std::make_tuple("\xb8\x78\x56\x34\x12\xff\x70\x20\xc3"_uarr,
|
return std::make_tuple("\xb8\x78\x56\x34\x12\xff\x70\x00\xc3"_uarr,
|
||||||
// NOLINTNEXTLINE
|
// NOLINTNEXTLINE
|
||||||
uint8_t{56u}, uintptr_t{1u});
|
uint8_t{56u}, uintptr_t{1u});
|
||||||
}
|
}
|
||||||
if constexpr (kArch == Arch::kX8664) {
|
if constexpr (kArch == Arch::kX8664) {
|
||||||
return std::make_tuple("\x48\xbf\x78\x56\x34\x12\x78\x56\x34\x12\xff\x77\x20\xc3"_uarr,
|
return std::make_tuple("\x48\xbf\x78\x56\x34\x12\x78\x56\x34\x12\xff\x77\x00\xc3"_uarr,
|
||||||
// NOLINTNEXTLINE
|
// NOLINTNEXTLINE
|
||||||
uint8_t{96u}, uintptr_t{2u});
|
uint8_t{96u}, uintptr_t{2u});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user