From 00e2bfee2808980e2944c31b55b37ba91f8f5890 Mon Sep 17 00:00:00 2001 From: altalk23 <45172705+altalk23@users.noreply.github.com> Date: Mon, 25 Dec 2023 07:11:17 +0300 Subject: [PATCH] find armv8 string dtor --- loader/src/platform/android/gdstdlib.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/loader/src/platform/android/gdstdlib.cpp b/loader/src/platform/android/gdstdlib.cpp index 8c44f3d23..26b19000b 100644 --- a/loader/src/platform/android/gdstdlib.cpp +++ b/loader/src/platform/android/gdstdlib.cpp @@ -7,14 +7,14 @@ static constexpr ptrdiff_t MENULAYER_SCENE = 0x309068 - 0x10000; static constexpr ptrdiff_t STRING_EMPTY = 0xaa1c3c - 0x10000; -static constexpr ptrdiff_t OPERATOR_DELETE = 0x7514c8 - 0x10000 + 1; +static constexpr ptrdiff_t STRING_DTOR = 0x7514c8 - 0x10000 + 1; static constexpr ptrdiff_t STRING_COPY = 0x753a44 - 0x10000 + 1; #elif defined(GEODE_IS_ANDROID64) static constexpr ptrdiff_t MENULAYER_SCENE = 0x6a62ec - 0x100000; static constexpr ptrdiff_t STRING_EMPTY = 0x12d8568 - 0x100000; -static constexpr ptrdiff_t OPERATOR_DELETE = 0xd6cb80 - 0x100000; +static constexpr ptrdiff_t STRING_DTOR = 0xdb9778 - 0x100000; // it's inlined but it exists !!!! static constexpr ptrdiff_t STRING_COPY = 0xdb5fdc - 0x100000; #endif @@ -44,11 +44,7 @@ namespace geode::stl { void StringImpl::free() { if (data.m_data == nullptr || data.m_data == emptyInternalString()) return; // TODO: reimplement this - #ifdef GEODE_IS_ANDROID32 - reinterpret_cast(geode::base::get() + OPERATOR_DELETE)(&data); - #else - reinterpret_cast(geode::base::get() + OPERATOR_DELETE)(&data.m_data[-1]); - #endif + reinterpret_cast(geode::base::get() + STRING_DTOR)(&data); } char* StringImpl::getStorage() {