summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2005-03-16 16:30:25 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2005-03-16 16:30:25 +0000
commitc40284970faad146d80a3f205b58547b247b0c63 (patch)
treea54dfa1a9213a5df810488c77823f096b00fab16
parente51b80085e1e121ddb827609d0f84d69e58cc16a (diff)
fix a broken list;
various other tweaks; ok deraadt@
-rw-r--r--gnu/usr.bin/ld/rtld/ld.so.141
1 files changed, 22 insertions, 19 deletions
diff --git a/gnu/usr.bin/ld/rtld/ld.so.1 b/gnu/usr.bin/ld/rtld/ld.so.1
index 419a030b1a0..db39f31f83f 100644
--- a/gnu/usr.bin/ld/rtld/ld.so.1
+++ b/gnu/usr.bin/ld/rtld/ld.so.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ld.so.1,v 1.3 2002/02/10 23:15:05 deraadt Exp $
+.\" $OpenBSD: ld.so.1,v 1.4 2005/03/16 16:30:24 jmc Exp $
.\" $NetBSD: rtld.1,v 1.2 1995/10/08 23:43:28 pk Exp $
.\"
.\" Copyright (c) 1995 Paul Kranenburg
@@ -39,7 +39,8 @@
.Nm
is a self-contained, position independent program image providing run-time
support for loading and link-editing shared objects into a process's
-address space. It uses the data structures
+address space.
+It uses the data structures
.Po
see
.Xr link 5
@@ -53,17 +54,20 @@ system call.
After all shared libraries have been successfully loaded,
.Nm
proceeds to resolve external references from both the main program and
-all objects loaded. A mechanism is provided for initialization routines
+all objects loaded.
+A mechanism is provided for initialization routines
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.
.Nm
looks for a symbol named
.Em .init
-in each object's symbol table. If present, this symbol is assumed to
+in each object's symbol table.
+If present, this symbol is assumed to
represent a C-function declared as
.Ft void
.Fn .init "void" ,
-which is then called. Similarly, a
+which is then called.
+Similarly, a
.Ft void
.Fn .fini "void"
function is called just before an object is unloaded from the process
@@ -96,8 +100,8 @@ process,
.Em crt0
uses the special symbol
.Va _DYNAMIC
-to determine whether a program is in fact dynamically linked or not. Whenever
-the linker
+to determine whether a program is in fact dynamically linked or not.
+Whenever the linker
.Xr ld 1
has relocated this symbol to a location other than 0,
.Em crt0
@@ -108,13 +112,14 @@ are needed
see
.Xr link 5
for details
-.Pc \&.
+.Pc .
.Em crt0
passes control to
.Nm ld.so Ns 's
entry point before the program's
.Fn main
-routine is called. Thus,
+routine is called.
+Thus,
.Nm
can complete the link-editing process before the dynamic program calls upon
services of any dynamic library.
@@ -134,8 +139,7 @@ library-name, major-version-number, minor-version-number
.Nm
recognises a number of environment variables that can be used to modify
its behaviour as follows:
-.Pp
-.Bl -tag -width "LD_TRACE_LOADED_OBJECTS_PROGNAME"
+.Bl -tag -width "LD_TRACE_LOADED_OBJECTS_FMT1"
.It Ev LD_LIBRARY_PATH
A colon separated list of directories, overriding the default search path
for shared libraries.
@@ -146,10 +150,11 @@ libraries are loaded.
This variable is ignored for set-user-ID and set-group-ID executables.
.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.
+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
+When set, 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
@@ -167,7 +172,7 @@ option and allows
.Xr ldd 1
to be operated as a filter more conveniently.
The following conversions can be used:
-.Bl -tag -indent "LD_TRACE_LOADED_OBJECTS_FMT1 " -width "xxxx"
+.Bl -tag -width "xxxx"
.It \&%a
The main program's name
.Po also known as
@@ -202,21 +207,19 @@ does not process any internal search paths that were recorded in the
executable.
.It Ev LD_NOSTD_PATH
When set, do not include a set of built-in standard directory paths for
-searching. This might be useful when running on a system with a completely
+searching.
+This might be useful when running on a system with a completely
non-standard filesystem layout.
.El
-.Pp
.Sh FILES
.Bl -tag -width /var/run/ld.so.hintsXXX -compact
.It Pa /var/run/ld.so.hints
library location hints built by
.Xr ldconfig 8
.El
-.Pp
.Sh SEE ALSO
.Xr ld 1 ,
.Xr link 5 ,
.Xr ldconfig 8
.Sh HISTORY
The shared library model employed first appeared in SunOS 4.0.
-