Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1407426569-78240-1-git-send-email-clement.vasseur@gmail.com>
Date: Thu,  7 Aug 2014 17:49:29 +0200
From: Clément Vasseur <clement.vasseur@...il.com>
To: musl@...ts.openwall.com
Subject: [PATCH] fix dlerror when using dlopen with a static libc

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.