summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/rtld.1
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1997-01-12 00:16:36 +0000
committerjdp <jdp@FreeBSD.org>1997-01-12 00:16:36 +0000
commit04703241efd557f902b72d1c73a134c4e7814ded (patch)
tree34aa5ccaf594b7246a06e04aea990ffec43ee04c /libexec/rtld-elf/rtld.1
parentcda6305fe1bcf75b59acded6a6ad6e4eeec98f64 (diff)
downloadFreeBSD-src-04703241efd557f902b72d1c73a134c4e7814ded.zip
FreeBSD-src-04703241efd557f902b72d1c73a134c4e7814ded.tar.gz
Add support for the LD_BIND_NOW environment variable. If it is set to a
nonempty string, then function calls are relocated at program start-up rather than lazily. This variable is standard on Sun and SVR4 systems. The dlopen() function now supports both lazy and immediate binding, as determined by its "mode" argument, which can be either 1 (RTLD_LAZY) or 2 (RTLD_NOW). I will add defines of these symbols to <dlfcn.h> as soon as I've done a little more checking to make sure they won't cause collisions or bootstrapping problems that would break "make world". The "LD_*" environment variables which alter dynamic linker behavior are now treated as unset if they are set to the empty string. This agrees with the standard SVR4 conventions for the dynamic linker. Add a work-around for programs compiled with certain buggy versions of crt0.o. The buggy versions failed to set the "crt_ldso" member of the interface structure. This caused certain error messages from the dynamic linker to begin with "(null)" instead of the pathname of the dynamic linker.
Diffstat (limited to 'libexec/rtld-elf/rtld.1')
-rw-r--r--libexec/rtld-elf/rtld.124
1 files changed, 17 insertions, 7 deletions
diff --git a/libexec/rtld-elf/rtld.1 b/libexec/rtld-elf/rtld.1
index 699738c..2f0cb5a 100644
--- a/libexec/rtld-elf/rtld.1
+++ b/libexec/rtld-elf/rtld.1
@@ -1,4 +1,4 @@
-.\" $Id: rtld.1,v 1.6 1996/10/18 04:49:43 jdp Exp $
+.\" $Id: rtld.1,v 1.7 1996/12/26 21:51:09 swallace Exp $
.\"
.\" Copyright (c) 1995 Paul Kranenburg
.\" All rights reserved.
@@ -117,15 +117,25 @@ other shared libraries. If the directory is not specified then
the directories specified by LD_LIBRARY_PATH will be searched first
followed by the set of built-in standard directories.
This is ignored for set-user-ID and set-group-ID programs.
+.It Ev LD_BIND_NOW
+When set to a nonempty string, causes
+.Nm
+to relocate all external function calls before starting execution of the
+program. Normally, function calls are bound lazily, at the first call
+of each function.
+.Ev LD_BIND_NOW
+increases the start-up time of a program, but it avoids run-time
+surprises caused by unexpectedly undefined functions.
.It Ev LD_WARN_NON_PURE_CODE
-When set, issue a warning whenever a link-editing operation requires
-modification of the text segment of some loaded object. This is usually
-indicative of an incorrectly built library.
+When set to a nonempty string, issue a warning whenever a link-editing
+operation requires modification of the text segment of some loaded
+object. This is usually indicative of an incorrectly built library.
.It Ev LD_SUPPRESS_WARNINGS
-When set, no warning messages of any kind are issued. Normally, a warning
-is given if satisfactorily versioned library could not be found.
+When set to a nonempty string, no warning messages of any kind are
+issued. Normally, a warning is given if satisfactorily versioned
+library could not be found.
.It Ev LD_TRACE_LOADED_OBJECTS
-When set, causes
+When set to a nonempty string, causes
.Nm
to exit after loading the shared objects and printing a summary which includes
the absolute pathnames of all objects, to standard output.
OpenPOWER on IntegriCloud