From 8f7d6dfb77c1a704bf333b462f6d8d5a0de721f7 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 12 Jan 2023 23:17:41 +0800 Subject: [PATCH] Cleanup unused functions --- native/src/zygisk/utils.cpp | 18 ------------------ native/src/zygisk/zygisk.hpp | 3 --- 2 files changed, 21 deletions(-) diff --git a/native/src/zygisk/utils.cpp b/native/src/zygisk/utils.cpp index f472cf49c..97cc5e2a3 100644 --- a/native/src/zygisk/utils.cpp +++ b/native/src/zygisk/utils.cpp @@ -17,24 +17,6 @@ static vector find_maps(const char *name) { return maps; } -std::pair find_map_range(const char *name, unsigned long inode) { - auto maps = find_maps(name); - uintptr_t start = 0u; - uintptr_t end = 0u; - for (const auto &map : maps) { - if (map.inode == inode) { - if (start == 0) { - start = map.start; - end = map.end; - } else if (map.start == end) { - end = map.end; - } - } - } - LOGD("found map %s with start = %zx, end = %zx\n", name, start, end); - return make_pair(reinterpret_cast(start), end - start); -} - void unmap_all(const char *name) { auto maps = find_maps(name); for (auto &info : maps) { diff --git a/native/src/zygisk/zygisk.hpp b/native/src/zygisk/zygisk.hpp index 9f45b056d..418fc8c6c 100644 --- a/native/src/zygisk/zygisk.hpp +++ b/native/src/zygisk/zygisk.hpp @@ -34,9 +34,6 @@ enum : int { #define HIJACK_BIN HIJACK_BIN32 #endif -// Find the memory address + size of the pages matching name + inode -std::pair find_map_range(const char *name, unsigned long inode); - // Unmap all pages matching the name void unmap_all(const char *name);