summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-04-22 08:40:58 -0700
committerElliott Hughes <enh@google.com>2019-04-22 08:43:57 -0700
commit915c5fb9f670cb2b1e646fade1f7ee87ef595eb7 (patch)
treeb4d37899cffac667b13301bcaf1f2707d72863ac
parent493322baf1bf658cd3f2807cea8fe0199b3c6e19 (diff)
libdl.a: make dlerror() always report an error.
Seems only logical, given that all the other calls fail. (Only thing that's weird about this is that calling dlerror() usually clears the error until you do something else that causes an error, but that doesn't seem worth the bookkeeping?) Bug: https://github.com/android-ndk/ndk/issues/965 Test: static unit tests still pass Change-Id: I5e5401e148c5857f1dbab9c5a7f4a6fc43d8d626
-rw-r--r--libdl/libdl_static.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdl/libdl_static.cpp b/libdl/libdl_static.cpp
index 714676258..0a36e6f16 100644
--- a/libdl/libdl_static.cpp
+++ b/libdl/libdl_static.cpp
@@ -23,7 +23,7 @@ void* dlopen(const char* /*filename*/, int /*flag*/) {
}
char* dlerror() {
- return nullptr;
+ return const_cast<char*>("libdl.a is a stub --- use libdl.so instead");
}
void* dlsym(void* /*handle*/, const char* /*symbol*/) {