Use "com.android.runtime" for its link namespace
For consistency, linker namespace for apex modules use its apex name
instead of hard-coded short name.
Bug: 148826508
Test: m / boot
Change-Id: I4bf565cd528d744fc42841fd2d9f8bf652d4d346
diff --git a/libc/bionic/malloc_common_dynamic.cpp b/libc/bionic/malloc_common_dynamic.cpp
index 2cb1e8a..6410bb2 100644
--- a/libc/bionic/malloc_common_dynamic.cpp
+++ b/libc/bionic/malloc_common_dynamic.cpp
@@ -310,12 +310,12 @@
//
// The libraries are packaged in the runtime APEX together with libc.so.
// However, since the libc.so is searched via the symlink in the system
- // partition (/system/lib/libc.so -> /apex/com.android.runtime/bionic.libc.so)
+ // partition (/system/lib/libc.so -> /apex/com.android.runtime/bionic/libc.so)
// libc.so is loaded into the default namespace. If we just dlopen() here, the
// 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("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,