From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: dynlib_addr and stripped dynamic modules Date: Mon, 07 Dec 2015 18:37:55 +0000 Message-ID: References: <83a8q53n8i.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0102def4634d3a0526532869 X-Trace: ger.gmane.org 1449513495 11813 80.91.229.3 (7 Dec 2015 18:38:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Dec 2015 18:38:15 +0000 (UTC) To: Eli Zaretskii , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 07 19:38:14 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a60fs-0007yi-Mb for ged-emacs-devel@m.gmane.org; Mon, 07 Dec 2015 19:38:13 +0100 Original-Received: from localhost ([::1]:55986 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a60fr-0003pe-SJ for ged-emacs-devel@m.gmane.org; Mon, 07 Dec 2015 13:38:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a60fo-0003pU-8q for emacs-devel@gnu.org; Mon, 07 Dec 2015 13:38:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a60fn-00088g-Bi for emacs-devel@gnu.org; Mon, 07 Dec 2015 13:38:08 -0500 Original-Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:35894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a60fl-00088A-Qq; Mon, 07 Dec 2015 13:38:05 -0500 Original-Received: by wmww144 with SMTP id w144so152408382wmw.1; Mon, 07 Dec 2015 10:38:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=Sq1sxcJC1765IhSRt0WBsXq86lpas2VaZAifwgI7gDI=; b=x9ofgjlbyLOz0Pii8oIZ/2Sv09u+N1c0kS7/pqCO6O64yUmyZenmjySehuKAFkvWee 5Q+S4HTfikgK5nIp+BlDPB2fI4Uvkkcwdlo8Hlw5l3c298Yqvk4ZvmKSuMAnRsO+v29a 7ca7zukTtzrdYRcnYpxORY/c1zD/JFYIyItwEPt8VGlU64SmP+b9AFwC4gHTPalndX4v wjpUVaWxWDtroflMRsU+Ui5d6I+Szpx2jPXXl9yK4DxS9VNLiKoqampNLY4AzUgAvFaa CEGRdK86moPyRZVNj8BnVScnTMbtK+q38aQrdgYqKOGTw69IwViLbwnzkUxLk06Yc8ku 0Tnw== X-Received: by 10.194.87.39 with SMTP id u7mr34983248wjz.11.1449513485288; Mon, 07 Dec 2015 10:38:05 -0800 (PST) In-Reply-To: <83a8q53n8i.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195961 Archived-At: --089e0102def4634d3a0526532869 Content-Type: text/plain; charset=UTF-8 Eli Zaretskii schrieb am So., 22. Nov. 2015 um 19:25 Uhr: > Does dynlib_laddr (and its underlying library function dladdr) work on > Posix hosts when the module was stripped of any unneeded symbols? > > Well written Emacs modules will have all but one of its functions > static and un-exported, so the only way to access the name of a > function by its address is to read a symbol table of some kind. Does > that work with *.so files that were run through "strip --strip-unneeded"? > > Probably not, but I haven't tested it. I've added dladdr because I found it useful for debugging myself and it's easy to implement, and I guess during debugging people will often work with unstripped libraries. --089e0102def4634d3a0526532869 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= So., 22. Nov. 2015 um 19:25=C2=A0Uhr:
Does dynlib_laddr (and its underlying library function dladdr) work on<= br> Posix hosts when the module was stripped of any unneeded symbols?

Well written Emacs modules will have all but one of its functions
static and un-exported, so the only way to access the name of a
function by its address is to read a symbol table of some kind.=C2=A0 Does<= br> that work with *.so files that were run through "strip --strip-unneede= d"?


Probably not, but I haven't tested= it. I've added dladdr because I found it useful for debugging myself a= nd it's easy to implement, and I guess during debugging people will oft= en work with unstripped libraries.=C2=A0
--089e0102def4634d3a0526532869--