From 91b0c68009c6d6efbaab8f268a5c9afb141c5ab4 Mon Sep 17 00:00:00 2001 From: dimitry Date: Fri, 29 Mar 2019 05:34:33 +0100 Subject: [PATCH] Fix CtsJniTestCases The linker_namespaces test need android_get_LD_LIBRARY_PATH function. Bug: http://b/129479780 Test: atest CtsJniTestCases Change-Id: Iba5f74e1e4b5b1de173150120293102524db2507 --- libdl/libdl.cpp | 8 ++++++++ libdl/libdl.map.txt | 1 + 2 files changed, 9 insertions(+) diff --git a/libdl/libdl.cpp b/libdl/libdl.cpp index f3a76d4a6..1ee401289 100644 --- a/libdl/libdl.cpp +++ b/libdl/libdl.cpp @@ -24,6 +24,9 @@ extern "C" { +__attribute__((__weak__, visibility("default"))) +void __loader_android_get_LD_LIBRARY_PATH(char* buffer, size_t buffer_size); + __attribute__((__weak__, visibility("default"))) void* __loader_dlopen(const char* filename, int flags, const void* caller_addr); @@ -70,6 +73,11 @@ __attribute__((__weak__, visibility("default"))) int __loader_android_get_application_target_sdk_version(); // Proxy calls to bionic loader +__attribute__((__weak__)) +void android_get_LD_LIBRARY_PATH(char* buffer, size_t buffer_size) { + __loader_android_get_LD_LIBRARY_PATH(buffer, buffer_size); +} + __attribute__((__weak__)) void* dlopen(const char* filename, int flag) { const void* caller_addr = __builtin_return_address(0); diff --git a/libdl/libdl.map.txt b/libdl/libdl.map.txt index b4b41178f..473bdf21b 100644 --- a/libdl/libdl.map.txt +++ b/libdl/libdl.map.txt @@ -43,5 +43,6 @@ LIBC_OMR1 { # introduced=27 LIBC_PLATFORM { global: + android_get_LD_LIBRARY_PATH; __cfi_init; } LIBC_OMR1;