kern/134391: [libc] dladdr(3) does effectively not work on main program.

David Chisnall csdavec at swansea.ac.uk
Mon Sep 14 01:30:09 UTC 2009


The following reply was made to PR kern/134391; it has been noted by GNATS.

From: David Chisnall <csdavec at swansea.ac.uk>
To: bug-followup at FreeBSD.org, phk at critter.freebsd.dk
Cc:  
Subject: Re: kern/134391: [libc] dladdr(3) does effectively not work on main program.
Date: Mon, 14 Sep 2009 02:06:51 +0100

 I tried to submit something related to this bug a while ago, but send- 
 pr ate it...
 
 dlsym() on FreeBSD is similarly broken.  It's worth noting that nm is  
 capable of listing all of the symbols in an executable or shared  
 object, even when compiled without debug info, and so they must exist  
 in the binary, they are just not being added to the symbol table that  
 is exposed via these functions.  The behaviour of dladdr() is  
 particularly bad because, unlike dlsym() it doesn't return failure, it  
 simply returns the name of a different symbol from the same library.
 
 David


More information about the freebsd-bugs mailing list