Skip to main content

Posts

Showing posts from November, 2015

LD_DEBUG

Posting this mainly as a reminder to myself...

If you ever find yourself needing to figure out a dynamic library loading problem on Linux, LD_DEBUG can be a massive help.

This is an environment variable you can set to make the dynamic linker print out a ton of useful diagnostic info. There are a number of different values which control the amount and type of diagnostics printed. One of the values is help; if you set LD_DEBUG to this and run executable it will print out a list of all the available options along with brief descriptions. For example, on my Linux workstation at the office:
> LD_DEBUG=help cat Valid options for the LD_DEBUG environment variable are: libs display library search paths reloc display relocation processing files display progress for input file symbols display symbol table processing bindings display information about symbol binding versions display version dependencies all all previous options combined st…