From 8116b70fee499a8e6b1846b77fa53d2bc70e30b8 Mon Sep 17 00:00:00 2001 From: Kiyoung Kim Date: Wed, 19 Feb 2020 16:18:11 +0900 Subject: [PATCH] Rename APEX Namespace Current APEX Namespace is named with APEX name itself, which also uses .(dot) so linker configuration can keep the syntax safe. For example, if there are APEX modules named 'A' and 'A.link.A', then 'namespace.A.link.A.link.A = a.so' phrase can be ambiguous from the linker. To allow any additional linker syntax in the future, we should avoid dot separator from the namespace name. Bug: 148826508 Test: m -j passed Test: boot succeeded from cuttlefish and walleye Change-Id: Ic3fe396aef6366fc6c7a0677bc7f92a57fd4e229 --- libc/bionic/malloc_common_dynamic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/bionic/malloc_common_dynamic.cpp b/libc/bionic/malloc_common_dynamic.cpp index b1bf3d0da..da87c332e 100644 --- a/libc/bionic/malloc_common_dynamic.cpp +++ b/libc/bionic/malloc_common_dynamic.cpp @@ -291,7 +291,7 @@ void* LoadSharedLibrary(const char* shared_lib, const char* prefix, MallocDispat // linker will load the libs found in /system/lib which might be incompatible // with libc.so in the runtime APEX. Use android_dlopen_ext to explicitly load // the ones in the runtime APEX. - struct android_namespace_t* runtime_ns = android_get_exported_namespace("com.android.runtime"); + struct android_namespace_t* runtime_ns = android_get_exported_namespace("com_android_runtime"); if (runtime_ns != nullptr) { const android_dlextinfo dlextinfo = { .flags = ANDROID_DLEXT_USE_NAMESPACE,