From 8a9b51e34f3769a5e3ea3a4383e3f00489088738 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Tue, 30 Jan 2024 21:33:09 +0000 Subject: Refactorings to make more logic available at the top level in native_loader.cpp. - Make the code that determines the partition from the dex path available to code in native_loader.cpp, and rename it since it'll be applied to arbitrary paths, not just APK's. - Move the linker namespace constants to a header file. - Various other minor code cleanups. To prepare for a later CL that needs to access these things from OpenNativeLibrary. No functional changes. Test: atest libnativeloader_e2e_tests libnativeloader_test Bug: 237577392 Change-Id: Ifc762bf6d4664b2d477c4ed3af58f149fb4c1189 --- libnativeloader/native_loader_lazy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libnativeloader/native_loader_lazy.cpp') diff --git a/libnativeloader/native_loader_lazy.cpp b/libnativeloader/native_loader_lazy.cpp index 5b82d00560..1c82dc428f 100644 --- a/libnativeloader/native_loader_lazy.cpp +++ b/libnativeloader/native_loader_lazy.cpp @@ -35,7 +35,7 @@ void* GetLibHandle() { template FuncPtr GetFuncPtr(const char* function_name) { - auto f = reinterpret_cast(dlsym(GetLibHandle(), function_name)); + FuncPtr f = reinterpret_cast(dlsym(GetLibHandle(), function_name)); LOG_FATAL_IF(f == nullptr, "Failed to get address of %s: %s", function_name, dlerror()); return f; } -- cgit v1.2.3-59-g8ed1b