[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dynlib_addr and stripped dynamic modules
From: |
Eli Zaretskii |
Subject: |
Re: dynlib_addr and stripped dynamic modules |
Date: |
Mon, 07 Dec 2015 20:48:29 +0200 |
> From: Philipp Stephani <address@hidden>
> Date: Mon, 07 Dec 2015 18:37:55 +0000
>
> Eli Zaretskii <address@hidden> 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.
The information from dynlib_addr is used every time there's a fatal
error in a module, so it's not just for debugging the module by its
author, it's also for users to report when they encounter errors while
using the module.