summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/gen/dlopen.311
-rw-r--r--libexec/rtld-elf/rtld.121
2 files changed, 29 insertions, 3 deletions
diff --git a/lib/libc/gen/dlopen.3 b/lib/libc/gen/dlopen.3
index 118e165..187f817 100644
--- a/lib/libc/gen/dlopen.3
+++ b/lib/libc/gen/dlopen.3
@@ -32,7 +32,7 @@
.\" @(#) dlopen.3 1.6 90/01/31 SMI
.\" $FreeBSD$
.\"
-.Dd September 10, 2002
+.Dd April 1, 2009
.Os
.Dt DLOPEN 3
.Sh NAME
@@ -123,7 +123,7 @@ call to
One of the following flags may be ORed into the
.Fa mode
argument:
-.Bl -tag -width RTLD_GLOBALX
+.Bl -tag -width RTLD_NODELETE
.It Dv RTLD_GLOBAL
Symbols from this shared object and its directed acyclic graph (DAG)
of needed objects will be available for resolving undefined references
@@ -141,6 +141,13 @@ the absolute pathnames of all objects, to standard output.
With this flag
.Fn dlopen
will return to the caller only in the case of error.
+.It Dv RTLD_NODELETE
+Prevents unload of the loaded object on
+.Fn dlclose .
+The same behaviour may be requested by
+.Fl "z nodelete"
+option of the static linker
+.Xr ld 1 .
.El
.Pp
If
diff --git a/libexec/rtld-elf/rtld.1 b/libexec/rtld-elf/rtld.1
index 81f3685..839d5f1 100644
--- a/libexec/rtld-elf/rtld.1
+++ b/libexec/rtld-elf/rtld.1
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 23, 2009
+.Dd April 1, 2009
.Dt RTLD 1
.Os
.Sh NAME
@@ -58,6 +58,25 @@ to be called on a per-object basis, giving a shared object an opportunity
to perform any extra set-up before execution of the program proper begins.
This is useful for C++ libraries that contain static constructors.
.Pp
+When resolving dependencies for the loaded objects,
+.Nm
+may be allowed to translate dynamic token strings in rpath and soname
+by setting
+.Fl "z origin"
+option of the static linker
+.Xr ld 1 .
+The following strings are recognized now:
+.Bl -tag -width ".Pa $PLATFORM"
+.It Pa $ORIGIN
+Translated to the full path of the loaded object.
+.It Pa $OSNAME
+Translated to the name of the operating system implementation.
+.It Pa $OSREL
+Translated to the release level of the operating system.
+.It Pa $PLATFORM
+Translated to the machine hardware platform.
+.El
+.Pp
The
.Nm
utility itself is loaded by the kernel together with any dynamically-linked
OpenPOWER on IntegriCloud