summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/dlopen.3
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1999-04-07 02:43:11 +0000
committerjdp <jdp@FreeBSD.org>1999-04-07 02:43:11 +0000
commitfd4074472e9ad1ab43fe3c0be1485762859d7254 (patch)
treef346235f0243c542ee429cf4148837fc8c63fced /lib/libc/gen/dlopen.3
parent7c9bf17e255d3dab0dd8586726cc51fedda0b184 (diff)
downloadFreeBSD-src-fd4074472e9ad1ab43fe3c0be1485762859d7254.zip
FreeBSD-src-fd4074472e9ad1ab43fe3c0be1485762859d7254.tar.gz
Add a new function dlversion() which returns the version number of
the dynamic linker in the same form as __FreeBSD_version. This is mainly intended for checking the dynamic linker version during a make world.
Diffstat (limited to 'lib/libc/gen/dlopen.3')
-rw-r--r--lib/libc/gen/dlopen.319
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/libc/gen/dlopen.3 b/lib/libc/gen/dlopen.3
index 9e848f9..e56e3ae 100644
--- a/lib/libc/gen/dlopen.3
+++ b/lib/libc/gen/dlopen.3
@@ -34,7 +34,7 @@
.Os FreeBSD
.Dt DLOPEN 3
.Sh NAME
-.Nm dlopen, dlsym, dlerror, dlclose
+.Nm dlopen, dlsym, dlerror, dlclose, dlversion
.Nd programmatic interface to the dynamic linker
.Sh SYNOPSIS
.Fd #include <dlfcn.h>
@@ -46,6 +46,8 @@
.Fn dlerror "void"
.Ft int
.Fn dlclose "void *handle"
+.Ft int
+.Fn dlversion "void"
.Sh DESCRIPTION
These functions provide a simple programmatic interface to the services of the
dynamic linker.
@@ -219,6 +221,19 @@ The object-intrinsic functions
and
.Fn _fini
are called with no arguments, and are not expected to return values.
+.Pp
+.Fn dlversion
+returns the version number of the dynamic linker. Interpreted
+as a decimal number, the version number has the form
+.Em rrrsss .
+.Em rrr
+corresponds to the base operating system release version, e.g., 400
+for release 4.0.0.
+.Em sss
+is a serial number that increases monotonically within each release
+version. If the installed dynamic linker is too old to support
+.Fn dlversion ,
+0 is returned.
.Sh NOTES
ELF executables need to be linked
using the
@@ -234,6 +249,8 @@ and
return the null pointer in the event of errors.
.Fn dlclose
returns 0 on success, or -1 if an error occurred.
+.Fn dlversion
+returns 0 if the dynamic linker is too old to support it.
Whenever an error has been detected, a message detailing it can be
retrieved via a call to
.Fn dlerror .
OpenPOWER on IntegriCloud