symbol-granularity trace output for ld and ldd?

Daniel Jacobowitz drow@false.org
Tue Jul 11 02:58:00 GMT 2006


On Tue, Jul 11, 2006 at 10:38:29AM +0930, Alan Modra wrote:
> On Mon, Jul 10, 2006 at 04:57:58PM -0700, Daniel S. Wilkerson wrote:
> > It would be really
> > handy if there were a way to just get from the static and especially
> > the dynamic linkers exactly what symbols were linked to what.
> 
> It's a bit of work, but you can glean this info from a linker map and
> LD_DEBUG=symbols ./program_under_test

If you're using glibc, LD_TRACE_LOADED_OBJECTS can be useful too.  It's
undocumented, but you can probably work out how it works, especially if
you poke around in the glibc or prelink sources.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Binutils mailing list