From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 14 01:30:09 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94BE41065672 for ; Mon, 14 Sep 2009 01:30:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2F29A8FC2E for ; Mon, 14 Sep 2009 01:30:06 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8E1U5jQ053696 for ; Mon, 14 Sep 2009 01:30:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8E1U5XZ053693; Mon, 14 Sep 2009 01:30:05 GMT (envelope-from gnats) Date: Mon, 14 Sep 2009 01:30:05 GMT Message-Id: <200909140130.n8E1U5XZ053693@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: David Chisnall Cc: Subject: Re: kern/134391: [libc] dladdr(3) does effectively not work on main program. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: David Chisnall List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Sep 2009 01:30:09 -0000 The following reply was made to PR kern/134391; it has been noted by GNATS. From: David Chisnall To: bug-followup@FreeBSD.org, phk@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