[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dynlib_addr and stripped dynamic modules

From: Philipp Stephani
Subject: Re: dynlib_addr and stripped dynamic modules
Date: Mon, 07 Dec 2015 18:57:46 +0000

Eli Zaretskii <address@hidden> schrieb am Mo., 7. Dez. 2015 um 19:48 Uhr:
> 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.

Sure, but having that info in debug mode is better than nothing.

To have reliable function name information, we need to change the interface of make_function to accept a symbol name parameter and have make_function assign the new function to the symbol. That would be fine with me: it makes the interface of make_function even more complex, but it would automatically cover the most common case. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]