Useful environment variable in the GNU C loader is LD_DEBUG. This triggers the dl* functions so that they give quite verbose information on what they are doing. For example:

 export LD_DEBUG=files command_to_run

displays the processing of files and libraries when handling libraries, telling you what dependencies are detected and which SOs are loaded in what order.

Setting LD_DEBUG to “bindings” displays information about symbol binding.

Setting it to “libs” displays the library search paths.

Setting it to “versions” displays the version depdendencies.

Setting LD_DEBUG to “help” and then trying to run a program will list the possible options.

Again, LD_DEBUG isn’t intended for normal use, but it can be handy when debugging and testing.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.