mailing list of musl libc
 help / color / mirror / code / Atom feed
* [PATCH] fix dlerror when using dlopen with a static libc
@ 2014-08-07 15:49 Clément Vasseur
  2014-08-08  4:55 ` Rich Felker
  0 siblings, 1 reply; 2+ messages in thread
From: Clément Vasseur @ 2014-08-07 15:49 UTC (permalink / raw)
  To: musl

when the dynamic loader is disabled, dlopen fails correctly but dlerror
did not return a human readable error string like it should have.
---
 src/ldso/dynlink.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c
index 12f14f7..aa1b99a 100644
--- a/src/ldso/dynlink.c
+++ b/src/ldso/dynlink.c
@@ -1603,6 +1603,8 @@ static int invalid_dso_handle(void *h)
 }
 void *dlopen(const char *file, int mode)
 {
+	strcpy(errbuf, "Dynamic loading not supported");
+	errflag = 1;
 	return 0;
 }
 void *__dlsym(void *restrict p, const char *restrict s, void *restrict ra)
-- 
2.0.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-08  4:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-07 15:49 [PATCH] fix dlerror when using dlopen with a static libc Clément Vasseur
2014-08-08  4:55 ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).