The behavior of the dynamic linker can be modified through various environment variables.
LD_DEBUG ¶The LD_DEBUG environment variable can be set to a comma-separated list
of keywords to enable debugging output from the dynamic linker.  Setting it to
help will display a list of all available keywords.  The output is
written to standard output by default.
libsDisplay library search paths.
relocDisplay relocation processing.
filesDisplay progress for input file processing.
symbolsDisplay symbol table processing.
bindingsDisplay information about symbol binding.
versionsDisplay version dependencies.
scopesDisplay scope information.
tlsDisplay information about Thread-Local Storage (TLS) handling, including TCB allocation, deallocation, and reuse. This is useful for debugging issues related to thread creation and lifecycle.
allAll previous options combined.
statisticsDisplay relocation statistics.
unusedDetermined unused DSOs.
helpDisplay a help message with all available options and exit.
LD_DEBUG_OUTPUT ¶If LD_DEBUG is set, the output is written to standard output by
default.  If LD_DEBUG_OUTPUT is set, the output is written to the
file specified by its value, with the process ID appended. For example, if
LD_DEBUG_OUTPUT is set to /tmp/glibc.debug, the output will be
written to a file named /tmp/glibc.debug.12345, where 12345 is
the process ID.