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;