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>
.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
(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