From owner-freebsd-current Tue Sep 1 19:51:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA19695 for freebsd-current-outgoing; Tue, 1 Sep 1998 19:51:50 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from zone.syracuse.net (zone.syracuse.net [205.232.47.17]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA19687 for ; Tue, 1 Sep 1998 19:51:48 -0700 (PDT) (envelope-from green@unixhelp.org) Received: from localhost (green@localhost) by zone.syracuse.net (8.8.8/8.8.7) with SMTP id TAA12120; Tue, 1 Sep 1998 19:55:51 -0400 (EDT) Date: Tue, 1 Sep 1998 19:55:51 -0400 (EDT) From: Brian Feldman X-Sender: green@zone.syracuse.net To: John Polstra cc: current@FreeBSD.ORG Subject: Re: E-day problems: rtld-elf dlsym() broken? In-Reply-To: <199809012330.QAA16019@austin.polstra.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I had thought of that about 1 minute after I sent the last reply mail :( I didn't expect it to change, but I suppose it wasn't deemed important. Anyway, I have no money for books being only a sophomore in high school, quite penniless, so I read the manpages to learn everything. The manpages, and the code itself... Well anyway, I guess that I'll wait for you to implement it, I'm not the right person to implement the NULL case, since I've never done any rtld hacking. Cherrs, Brian Feldman On Tue, 1 Sep 1998, John Polstra wrote: > > Actually, no. The program does no munging of the input at all, it looks up > > with or without the _, whichever you input by typing "lookup > > whatever\n"... it's not my program's fault, watch: > > OK, I looked at your source. It's failing because the dynamic > linker doesn't handle the way you're calling dlsym, with a NULL > first argument: > > if ((void *)index(line, '\0') < line + 8 || > (lameptr = (void *)dlsym(NULL, baz = (char *)line + 7)) == NULL) > printf("%s: not found\n", *baz ? baz : ""); > > It's true that's documented in dlsym(3), so I guess I'll have to > support it. The original SunOS manual also documents it, but > Solaris makes no mention of it. > > I'll fix it. > > John > -- > John Polstra jdp@polstra.com > John D. Polstra & Co., Inc. Seattle, Washington USA > "Self-knowledge is always bad news." -- John Barth > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message