diff --git a/man8/ld.so.8 b/man8/ld.so.8 index b33f417d6..e6f173c55 100644 --- a/man8/ld.so.8 +++ b/man8/ld.so.8 @@ -162,6 +162,14 @@ Use instead of .B LD_LIBRARY_PATH environment variable setting (see below). +The names +.IR ORIGIN , +.IR LIB , +and +.IR PLATFORM +are interpreted as for the +.BR LD_LIBRARY_PATH +environment variable. .TP .BI \-\-inhibit\-rpath " list" Ignore RPATH and RUNPATH information in object names in @@ -258,6 +266,31 @@ Similar to the .B PATH environment variable. This variable is ignored in secure-execution mode. + +Within the pathnames specified in +.BR LD_LIBRARY_PATH , +the dynamic linker expands the strings +.IR $ORIGIN , +.IR $LIB , +and +.IR $PLATFORM +(or the versions using curly braces around the names) +as described above in +.IR "Rpath token expansion" . +Thus, for example, +the following would cause a library to be searched for in either the +.I lib +or +.I lib64 +subdirectory below the directory containing the program to be executed: + + $ \fBLD_LIBRARY_PATH='$ORIGIN/$LIB' prog\fP + +(Note the use of single quotes, which prevent expansion of +.I ORIGIN +and +.I LIB +as shell variables!) .TP .B LD_PRELOAD A list of additional, user-specified, ELF shared @@ -269,6 +302,23 @@ In secure-execution mode, preload pathnames containing slashes are ignored, and shared objects in the standard search directories are loaded only if the set-user-ID mode bit is enabled on the shared object file. + +Within the pathnames specified in +.BR LD_PRELOAD , +the dynamic linker understands the strings +.IR $ORIGIN , +.IR $LIB , +and +.IR $PLATFORM +(or the versions using curly braces around the names) +as described above in +.IR "Rpath token expansion" . +.\" Tested with the following: +.\" +.\" LD_PRELOAD='$LIB/libmod.so' LD_LIBRARY_PATH=. ./prog +.\" +.\" which will reload the libmod.so in 'lib' or 'lib64', using it +.\" in preference to the version in '.'. .TP .B LD_TRACE_LOADED_OBJECTS (ELF only)