Update submodules (#2229)
This commit is contained in:
parent
6ee21618a6
commit
cd6e947397
|
|
@ -33,17 +33,6 @@
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include "config_bridge.h"
|
#include "config_bridge.h"
|
||||||
|
|
||||||
#define _uintval(p) reinterpret_cast<uintptr_t>(p)
|
|
||||||
#define _ptr(p) reinterpret_cast<void *>(p)
|
|
||||||
#define _align_up(x, n) (((x) + ((n) - 1)) & ~((n) - 1))
|
|
||||||
#define _align_down(x, n) ((x) & -(n))
|
|
||||||
#define _page_size 4096
|
|
||||||
#define _page_align(n) _align_up(static_cast<uintptr_t>(n), _page_size)
|
|
||||||
#define _ptr_align(x) _ptr(_align_down(reinterpret_cast<uintptr_t>(x), _page_size))
|
|
||||||
#define _make_rwx(p, n) ::mprotect(_ptr_align(p), \
|
|
||||||
_page_align(_uintval(p) + n) != _page_align(_uintval(p)) ? _page_align(n) + _page_size : _page_align(n), \
|
|
||||||
PROT_READ | PROT_WRITE | PROT_EXEC)
|
|
||||||
|
|
||||||
namespace lspd {
|
namespace lspd {
|
||||||
|
|
||||||
[[gnu::always_inline]]
|
[[gnu::always_inline]]
|
||||||
|
|
@ -87,7 +76,6 @@ inline bool RegisterNativeMethodsInternal(JNIEnv *env,
|
||||||
RegisterNativeMethodsInternal(env, GetNativeBridgeSignature() + #class_name, gMethods, arraysize(gMethods))
|
RegisterNativeMethodsInternal(env, GetNativeBridgeSignature() + #class_name, gMethods, arraysize(gMethods))
|
||||||
|
|
||||||
inline int HookFunction(void *original, void *replace, void **backup) {
|
inline int HookFunction(void *original, void *replace, void **backup) {
|
||||||
_make_rwx(original, _page_size);
|
|
||||||
if constexpr (isDebug) {
|
if constexpr (isDebug) {
|
||||||
Dl_info info;
|
Dl_info info;
|
||||||
if (dladdr(original, &info))
|
if (dladdr(original, &info))
|
||||||
|
|
@ -95,7 +83,7 @@ inline int HookFunction(void *original, void *replace, void **backup) {
|
||||||
info.dli_sname ? info.dli_sname : "(unknown symbol)", info.dli_saddr,
|
info.dli_sname ? info.dli_sname : "(unknown symbol)", info.dli_saddr,
|
||||||
info.dli_fname ? info.dli_fname : "(unknown file)", info.dli_fbase);
|
info.dli_fname ? info.dli_fname : "(unknown file)", info.dli_fbase);
|
||||||
}
|
}
|
||||||
return DobbyHook(original, replace, backup);
|
return DobbyHook(original, reinterpret_cast<dobby_dummy_func_t>(replace), reinterpret_cast<dobby_dummy_func_t *>(backup));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int UnhookFunction(void *original) {
|
inline int UnhookFunction(void *original) {
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,6 @@ endmacro()
|
||||||
|
|
||||||
SET_OPTION(DOBBY_GENERATE_SHARED OFF)
|
SET_OPTION(DOBBY_GENERATE_SHARED OFF)
|
||||||
SET_OPTION(Plugin.SymbolResolver OFF)
|
SET_OPTION(Plugin.SymbolResolver OFF)
|
||||||
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
||||||
SET_OPTION(DOBBY_DEBUG OFF)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
set(LIBCXX_SOURCES
|
set(LIBCXX_SOURCES
|
||||||
algorithm.cpp
|
algorithm.cpp
|
||||||
|
|
@ -67,7 +64,7 @@ set(LIBCXX_FLAGS
|
||||||
-D__STDC_FORMAT_MACROS
|
-D__STDC_FORMAT_MACROS
|
||||||
)
|
)
|
||||||
set(LIBCXX_EXPORT_INCLUDES cxx/include)
|
set(LIBCXX_EXPORT_INCLUDES cxx/include)
|
||||||
set(LIBCXX_INCLUDES)
|
set(LIBCXX_INCLUDES cxx/src)
|
||||||
|
|
||||||
set(LIBCXXABI_SOURCES
|
set(LIBCXXABI_SOURCES
|
||||||
abort_message.cpp
|
abort_message.cpp
|
||||||
|
|
@ -78,7 +75,6 @@ set(LIBCXXABI_SOURCES
|
||||||
cxa_handlers.cpp
|
cxa_handlers.cpp
|
||||||
cxa_noexception.cpp
|
cxa_noexception.cpp
|
||||||
cxa_thread_atexit.cpp
|
cxa_thread_atexit.cpp
|
||||||
cxa_unexpected.cpp
|
|
||||||
cxa_vector.cpp
|
cxa_vector.cpp
|
||||||
cxa_virtual.cpp
|
cxa_virtual.cpp
|
||||||
stdlib_exception.cpp
|
stdlib_exception.cpp
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0aa67c3ffea069bdb58fe3b5e7aad06934afb292
|
Subproject commit 82090ae75f7d284f2647a67f3f80f28f54eaddfc
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 62e419eaa342eb4c4c5893e6a6a4417ca7d252fa
|
Subproject commit a79d029bb2fd84a64a3fce87b813c222958725b7
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit ae963e444fcdf1ad45f662e0c706568f34506528
|
Subproject commit a33701196adfad74917046096bf5a2aa0ab0bb50
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 7480a21779a5e11ea2cad727dd21665c0bdefdd7
|
Subproject commit 64fa69ec0d662489fcb8614bb994b9a46e172f02
|
||||||
Loading…
Reference in New Issue