From owner-freebsd-hackers Wed Mar 24 10:18:55 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 0883C14D62 for ; Wed, 24 Mar 1999 10:18:52 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.1/8.9.1) with ESMTP id KAA28755; Wed, 24 Mar 1999 10:18:27 -0800 (PST) (envelope-from jdp@polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.9.2/8.9.1) id KAA00588; Wed, 24 Mar 1999 10:18:26 -0800 (PST) (envelope-from jdp@polstra.com) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <199903240623.XAA17580@mt.sri.com> Date: Wed, 24 Mar 1999 10:18:26 -0800 (PST) Organization: Polstra & Co., Inc. From: John Polstra To: Nate Williams Subject: Re: dladdr(3) question Cc: freebsd-hackers@FreeBSD.ORG, Steve Price Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Nate Williams wrote: > John would know more (hope he's feeling better). Nope, I still have the flu pretty bad. So I'll keep this brief. >> I know I'm probably doing something stupid here, but I >> seem to be having a problem getting dladdr(3) to work. > > I just researched this (since I'm as interested in Steve as to why this > doesn't work. :) It appears to me that dladdr is *NOT* supported in ELF > in the current code. However, it is supported in a.out (in 3.* only). > > The functionality is missing in /usr/src/libexec/rtld-elf, although I > suspect it's an oversight and not intentional. That's right. I just noticed that it was missing a couple of weeks ago. > I'm not *real* familiar with the loader code, but given it's already > implemented for a.out I suspect it should be easy to add to the elf > loader. Yes, it should be easy. The infrastructure is already there in rtld.c, such as the obj_from_addr() function. Then you'd have to add an entry for it to the "exports" array, and put a dummy stub into "src/lib/libc/gen/dlfcn.c". I'll try to get to it soon. Or if you feel like doing it yourself, I could review it for you. John --- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-interest is the aphrodisiac of belief." -- James V. DeLong To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message