From owner-freebsd-current Tue Sep 1 16:31:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA17918 for freebsd-current-outgoing; Tue, 1 Sep 1998 16:31:15 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from austin.polstra.com (austin.polstra.com [206.213.73.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA17908 for ; Tue, 1 Sep 1998 16:31:14 -0700 (PDT) (envelope-from jdp@austin.polstra.com) Received: from austin.polstra.com (jdp@localhost) by austin.polstra.com (8.8.8/8.8.8) with ESMTP id QAA16019; Tue, 1 Sep 1998 16:30:11 -0700 (PDT) (envelope-from jdp) Message-Id: <199809012330.QAA16019@austin.polstra.com> To: Brian Feldman cc: current@FreeBSD.ORG Subject: Re: E-day problems: rtld-elf dlsym() broken? In-reply-to: Your message of "Tue, 01 Sep 1998 15:20:45 EDT." Date: Tue, 01 Sep 1998 16:30:11 -0700 From: John Polstra Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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