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
This commit is contained in:
Elliott Hughes 2019-04-22 08:40:58 -07:00
parent 493322baf1
commit 915c5fb9f6
1 changed files with 1 additions and 1 deletions

View File

@ -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*/) {