From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/82 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: dlopen/dlsym support committed Date: Sun, 26 Jun 2011 19:41:04 -0400 Message-ID: <20110626234104.GY12592@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1309132079 13257 80.91.229.12 (26 Jun 2011 23:47:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 26 Jun 2011 23:47:59 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-166-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jun 27 01:47:55 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Qaz3T-0007hd-6F for gllmg-musl@lo.gmane.org; Mon, 27 Jun 2011 01:47:55 +0200 Original-Received: (qmail 32607 invoked by uid 550); 26 Jun 2011 23:47:54 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32599 invoked from network); 26 Jun 2011 23:47:54 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:82 Archived-At: Greetings! I've committed experimental dlopen/dlsym support for musl. Presently they only work if the main program is dynamic linked. Making them work for static linked programs actually requires some really ugly hackery which I'm putting off for the time being. Some other limitations: - dlclose is a no-op. There's not yet any way to unload libraries which are no longer needed. This should eventually be possible however, at least for RTLD_LOCAL mode. - dlerror is a dummied out, so it's very hard to tell what went wrong if loading or resolving a symbol fails. Nonetheless, I believe even the current very limited version meets the POSIX requirements for how dependency and symbol resolution should take place, and it should be possible to compile and use programs that depend on dynamic module loading. I'd be happy to see some reports of success or failure with major software packages. Rich