News for hackers. Stuff that matters.
Re:The LD_DEBUG environment variable (2012) by alschwalm on Tuesday June 09, 2026 @03:55PM (#48466749)
LD_AUDIT is another one worth knowing about (though I admittedly use it less often than LD_DEBUG) https://man7.org/linux/man-pages/man7/rtld-audit.7.html
Re:The LD_DEBUG environment variable (2012) by rramadass on Tuesday June 09, 2026 @11:43PM (#48471157)
Do you know where i can find a list of all LD_XXX environment variables?
Re:The LD_DEBUG environment variable (2012) by BobbyTables2 on Wednesday June 10, 2026 @12:35AM (#48471480)
Read The Fine Manpage

ld.so

Re:The LD_DEBUG environment variable (2012) by rramadass on Wednesday June 10, 2026 @01:09AM (#48471695)
Re:The LD_DEBUG environment variable (2012) by zorgmonkey on Wednesday June 10, 2026 @12:36AM (#48471484)
The man page ld.so has ENVIRONMENT section that looks pretty good.

Otherwise one of the most reliable options is to simply grep the source code for calls to getenv, I would not be that surprised if their are some extra ones that are undocumented.

Re:The LD_DEBUG environment variable (2012) by rramadass on Wednesday June 10, 2026 @01:08AM (#48471690)
Found it - https://man7.org/linux/man-pages/man8/ld.so.8.html#ENVIRONME...

Yeah, i was looking for little known/undocumented environment variables (eg. i didn't know of LD_AUDIT).

Re:The LD_DEBUG environment variable (2012) by rramadass on Wednesday June 10, 2026 @01:18AM (#48471752)
A couple of posts on how to use LD_AUDIT;

Leveraging LD_AUDIT to Beat the Traditional Linux Library Preloading Technique - https://www.sentinelone.com/labs/leveraging-ld_audit-to-beat...

rtld-audit and LD_AUDIT - https://vsoch.github.io/2021/ldaudit/

Re:The LD_DEBUG environment variable (2012) by account42 on Wednesday June 10, 2026 @08:18AM (#48475187)
Used this once to debug an issue where it turned out unwanted exports in one library A where used to satisfy imports in another library B and thus preventing library A from being unloaded. Fun times.

The ldd command is also essentially just a wrapper script that sets LD_* variables that get the dynamic loader to do all the real work.