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 <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2020-09-10 11:46:21 +02:00
parent 4f247e780f
commit ea4cec5f87
1 changed files with 5 additions and 2 deletions

View File

@ -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