From: Michael Kerrisk Date: Thu, 10 Sep 2020 09:46:21 +0000 (+0200) Subject: dlopen.3: Clarify DT_RUNPATH/DT_RPATH details X-Git-Tag: man-pages-5.09~407 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea4cec5f87a7bdc7a7f8fce968656f8fc8309b3a;p=thirdparty%2Fman-pages.git dlopen.3: Clarify DT_RUNPATH/DT_RPATH details It is the DT_RUNPATH/DT_RPATH of the calling object (not the executable) that is relevant for the library search. Verified by experiment. Signed-off-by: Michael Kerrisk --- diff --git a/man3/dlopen.3 b/man3/dlopen.3 index 8e18f70c07..ec8df1b585 100644 --- a/man3/dlopen.3 +++ b/man3/dlopen.3 @@ -85,7 +85,10 @@ Otherwise, the dynamic linker searches for the object as follows .BR ld.so (8) for further details): .IP o 4 -(ELF only) If the executable file for the calling program +(ELF only) If the calling object +(i.e., the shared library or executable from which +.BR dlopen () +is called) contains a DT_RPATH tag, and does not contain a DT_RUNPATH tag, then the directories listed in the DT_RPATH tag are searched. .IP o @@ -96,7 +99,7 @@ then these are searched. (As a security measure, this variable is ignored for set-user-ID and set-group-ID programs.) .IP o -(ELF only) If the executable file for the calling program +(ELF only) If the calling object contains a DT_RUNPATH tag, then the directories listed in that tag are searched. .IP o