Modify android_dlwarning function to use a callback
The previous implementation of android_dlwarning was not thread-safe
and could return a pointer soon to become invalid in some situations.
This change fixed the problem. I have also removed android_dlwarning
from the dlext.h header file in case we decide to keep
android_dlwarning in the final release.
Bug: http://b/27453994
Change-Id: If6c896a80a17c4be0e18795e617712ad36a106fe
diff --git a/libdl/libdl.c b/libdl/libdl.c
index d2e5e31..b62ee5c 100644
--- a/libdl/libdl.c
+++ b/libdl/libdl.c
@@ -70,4 +70,4 @@
return 0;
}
-const char* android_dlwarning(void) { return 0; }
+void android_dlwarning(void* obj, void (*f)(void*, const char*)) { f(obj, 0); }