summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2022-06-14 09:56:08 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2022-06-14 09:56:08 +0000
commit2cfa2199f53de8e74752d484123b92692ea54506 (patch)
tree97428e7ac059b9e65eb3624db1d0e943d3be72f3 /libexec
parent4d895c77fb277d66c8e0cc8decd95c2e9d9bf6fc (diff)
Document search order
Explain when and how LD_LIBRARY_PATH, DT_RUNPATH and DT_RPATH are used. Input OK guenther
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ld.so/ld.so.132
1 files changed, 30 insertions, 2 deletions
diff --git a/libexec/ld.so/ld.so.1 b/libexec/ld.so/ld.so.1
index 6a1a8c3071c..9a1bbc1330e 100644
--- a/libexec/ld.so/ld.so.1
+++ b/libexec/ld.so/ld.so.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ld.so.1,v 1.24 2020/05/08 10:57:50 jca Exp $
+.\" $OpenBSD: ld.so.1,v 1.25 2022/06/14 09:56:07 kn Exp $
.\" $NetBSD: rtld.1,v 1.2 1995/10/08 23:43:28 pk Exp $
.\"
.\" Copyright (c) 1995 Paul Kranenburg
@@ -29,7 +29,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: May 8 2020 $
+.Dd $Mdocdate: June 14 2022 $
.Dt LD.SO 1
.Os
.Sh NAME
@@ -79,6 +79,34 @@ looked up by hashing on the 3-tuple
.Aq library-name , major-version-number , minor-version-number .
.Pp
.Nm
+searches for shared objects in the following lists of paths:
+.Pp
+.Bl -enum -offset ident -compact
+.It
+.Ev LD_LIBRARY_PATH
+environment variable if set
+.It
+.Dv DT_RUNPATH
+of the calling object if set, otherwise:
+.Bl -enum -compact
+.It
+.Dv DT_RPATH
+of the calling object if set
+.It
+.Dv DT_RPATH
+of the program if set
+.El
+(The use of
+.Dv DT_RPATH
+is deprecated as its behaviour varies across operating systems.)
+.It
+default search path set by
+.Xr ldconfig 8
+.It
+.Pa /usr/lib
+.El
+.Pp
+.Nm
recognises a number of environment variables that can be used to modify
its behaviour as follows:
.Pp