Thanks, Adam! I am aware of the dynamic symbol section and relocation table in ELF. I have a picture of how dynamic loader relocates and patches dynamic functions. What I am curious is that how can DTrace still get the static function names (those functions built into the program itself, or static functions)? I have a hypothesis that .hash section is used since it is normally available.
-Ling On Thu, Oct 8, 2009 at 12:14 PM, Adam Leventhal <a...@eng.sun.com> wrote: > I am really curious and interested to know how the pid provider can figure >> out the symbolic >> information of the called functions from a stripped program. Could someone >> help me >> demystify the mechanism? >> > > First, stripping a program is the bane of debugging since it deprives the > debugger of a bunch of symbolic information. However, even a stripped > program > must contain some symbolic information for doing dynamic linker lookups. > For example, if a program calls a function in a library that symbol name > will survive stripping. > > Do a nm -D on your program to see that 'dynamic' symbol table. > > Adam > > -- > Adam Leventhal, Fishworks http://blogs.sun.com/ahl > >
_______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org