From 5ca6ab4f5e010132eb1d669259ebdf3d25697e80 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 26 Feb 2019 12:46:47 +0100 Subject: [PATCH] ld.so.8: Document the --preload command-line option added in glibc 2.30 Signed-off-by: Michael Kerrisk --- man8/ld.so.8 | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/man8/ld.so.8 b/man8/ld.so.8 index 6271f23ed..cdc4f233d 100644 --- a/man8/ld.so.8 +++ b/man8/ld.so.8 @@ -192,6 +192,24 @@ are delimited by colons or spaces. .B \-\-list List all dependencies and how they are resolved. .TP +.BR \-\-preload " \fIlist\fP (since glibc 2.30)" +Preload the objects specified in +.IR list . +The objects in +.I list +are delimited by colons or spaces. +The objects are preloaded as explained in the description of the +.BR LD_PRELOAD +environment variable below. +.IP +By contrast with +.BR LD_PRELOAD , +the +.BR \-\-preload +option provides a way to perform preloading for a single executable +without affecting preloading performed in any child process that executes +a new program. +.TP .B \-\-verify Verify that program is dynamically linked and this dynamic linker can handle it. @@ -347,6 +365,23 @@ as described above in .\" .\" which will preload the libmod.so in 'lib' or 'lib64', using it .\" in preference to the version in '.'. +.IP +There are various methods of specifying libraries to be preloaded, +and these are handled in the following order: +.RS +.IP (1) 4 +The +.BR LD_PRELOAD +environment variable. +.IP (2) +The +.B \-\-preload +command-line option when invoking the dynamic linker directly. +.IP (3) +The +.I /etc/ld.so.preload +file (described below). +.RE .TP .BR LD_TRACE_LOADED_OBJECTS If set (to any value), causes the program to list its dynamic