1

In Linux ldd has very useful option LD_DEBUG.

LD_DEBUG (glibc since 2.1) Output verbose debugging information about the dynamic linker. If set to all prints all debugging information it has, if set to help prints a help message about which categories can be specified in this environment variable. Since glibc 2.3.4, LD_DEBUG is ignored for set-user-ID/set-group-ID binaries.

Can i do it on FreeBSD?

andreych
  • 173
  • 6

1 Answers1

3

I believe you will have to turn rtld debugging on in the source code in order for LD_DEBUG to have effect on FreeBSD. So, the short answer is -- no, LD_DEBUG does not do anything unless you rebuild runtime linker with -DDEBUG.

That said, there's still a lot of useful info that runtime linker can produce. See rtld man page for the details: http://www.freebsd.org/cgi/man.cgi?query=rtld

ArtemB
  • 3,136
  • 14
  • 16