Environment variables

Updated: April 19, 2023

The following environment variables affect the operation of the runtime linker:

Note: For security reasons, the runtime linker unsets DL_DEBUG, LD_DEBUG, LD_DEBUG_OUTPUT, LD_LIBRARY_PATH, and LD_PRELOAD if the binary has the setuid bit set.
Display diagnostic messages. The value can be a comma-separated list of the following:
  • all — display all debug messages.
  • help — display a help message, and then exit.
  • reloc — display relocation processing messages.
  • libs — display information about shared objects being opened.
  • statistics — display runtime linker statistics.
  • lazyload — print lazy-load debug messages.
  • debug — print various runtime linker debug messages.

A value of 1 (one) is the same as all.

Affects lazy-load dependencies due to full symbol resolution. Typically, it forces the loading of all lazy-load dependencies (until all symbols have been resolved).
A synonym for DL_DEBUG; if you set both variables, DL_DEBUG takes precedence.
The name of a file in which the runtime linker writes its output. By default, output is written to stderr.
A colon-separated list of paths that the runtime linker uses to search for shared libraries.
A colon-separated list of full paths to the shared libraries on an ELF system that you want to load before loading other libraries. You can use this environment variable to add or change functionality when you run a program.
If this environment variable is set, the runtime linker faults instead of exiting on fatal errors, so that you can examine the core file that's generated.