Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Mar 1999 10:18:26 -0800 (PST)
From:      John Polstra <jdp@polstra.com>
To:        Nate Williams <nate@mt.sri.com>
Cc:        freebsd-hackers@FreeBSD.ORG, Steve Price <sprice@hiwaay.net>
Subject:   Re: dladdr(3) question
Message-ID:  <XFMail.990324101826.jdp@polstra.com>
In-Reply-To: <199903240623.XAA17580@mt.sri.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.990324101826.jdp>