diff --git a/man8/ld.so.8 b/man8/ld.so.8 index 84278d0..8350c40 100644 --- a/man8/ld.so.8 +++ b/man8/ld.so.8 @@ -143,6 +143,33 @@ ELF libraries at execution-time. Similar to the .B PATH environment variable. + +.B ld.so +understands the strings +.IR $ORIGIN , +.I $LIB +and +.I $PLATFORM +(or equivalently +.IR ${var} ) +in a LD_LIBRARY_PATH string. + +.B LIB +is expanded to lib or lib64 based on the architecture. Use when +mixed environment (32bit and 64bit) searches for same libraries names. + +.B ORIGIN +is expanded to the location of the binary which is currently loaded. + +.B PLATFORM +is expanded to the running platform. + +The following example will allow single +.B LD_LIBRARY_PATH +to be used by 32bit and 64bit applications that searching for 'liba.so', +which resides at /opt/my/lib and /opt/my/lib64. + +export LD_LIBRARY_PATH="/opt/my/\\${LIB}:${LD_LIBRARY_PATH}" .TP .B LD_PRELOAD A whitespace-separated list of additional, user-specified, ELF shared