From bbba55c2217762947e639f826d73d0b3d411a7ea Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 29 Jun 2017 12:21:36 -0400 Subject: [PATCH] ld.so.8: Expand DT_RUNPATH details. ld.so.8: Expand DT_RUNPATH details. Every 3 years we get asked why DT_RUNPATH doesn't work like DT_RPATH. The most recent question was here: https://www.sourceware.org/ml/libc-help/2017-06/msg00013.html We need to expand the description of DT_RUNPATH to cover this situation and explain that the DT_RUNPATH entries apply only to the immediate DT_NEEDED, not that of another, say dlopen'd child object. Applies to master. Signed-off-by: Carlos O'Donell Signed-off-by: Michael Kerrisk --- man8/ld.so.8 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/man8/ld.so.8 b/man8/ld.so.8 index 89965a1e5..e9e320d64 100644 --- a/man8/ld.so.8 +++ b/man8/ld.so.8 @@ -68,7 +68,11 @@ in which case it is ignored. .IP o Using the directories specified in the DT_RUNPATH dynamic section attribute -of the binary if present. +of the binary if present. Such directories are only searched to +find those objects required by DT_NEEDED (direct dependencies) entries +and do not apply to those object's children who must themselves have +their own DT_RUNPATH entries. This is unlike DT_RPATH which is applied +to searches for all children in the dependency tree. .IP o From the cache file .IR /etc/ld.so.cache ,