From owner-freebsd-hackers Mon Aug 18 15:38:46 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id PAA22674 for hackers-outgoing; Mon, 18 Aug 1997 15:38:46 -0700 (PDT) Received: from rocky.mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id PAA22668; Mon, 18 Aug 1997 15:38:41 -0700 (PDT) Received: (from nate@localhost) by rocky.mt.sri.com (8.7.5/8.7.3) id QAA03400; Mon, 18 Aug 1997 16:38:30 -0600 (MDT) Date: Mon, 18 Aug 1997 16:38:30 -0600 (MDT) Message-Id: <199708182238.QAA03400@rocky.mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Brian Mitchell Cc: Nate Williams , "Jordan K. Hubbard" , hackers@freebsd.org Subject: Re: [Fwd: Re: Please Help Me Understand dlopen()] In-Reply-To: References: <199708182158.PAA03256@rocky.mt.sri.com> X-Mailer: VM 6.29 under 19.15 XEmacs Lucid Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > > > Hmmm - any comments, ld hackers? > > > > > > The freeBSD dlsym() is - as far as I know - the only dlsym() > > > implementation that doesn't search for _funktion() ... > > > > Here's a quick and dirty patch that implements it. I tested it locally > > w/out any problems, but it has lots of possible problems. > > openbsd's is another that does not look for underscores. freebsd's has a > few other minor holes too. If you dlsym() a nonexistant symbol, freebsd > (in 2.2.1 atleast) returns a NULL pointer but does not (as it should) set > the dlerror() errorcode. Umm, yes it does. At least, it does in the version in 2.2. >From ld/rtld/rtld.c: if (np == NULL) { generror("Undefined symbol"); return NULL; generror sets the dlerror() error string. I'm working on a better fix than I sent out now, but it's not as easy as it could be due to the way the code is laid out. Nate