Make a somewhat unsatisfactory attempt to describe the effects of

the RTLD_GLOBAL and RTLD_LOCAL flags which can be passed to dlopen().
This commit is contained in:
John Polstra 2000-09-19 04:02:05 +00:00
parent 8343765bcb
commit 07f643a52b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=66054

View File

@ -91,7 +91,8 @@ executable of the process.
.Fa mode
controls the way in which external function references from the
loaded object are bound to their referents.
It must contain one of the following values:
It must contain one of the following values, possibly ORed with
additional flags which will be described subsequently:
.Bl -tag -width RTLD_LAZYX
.It Dv RTLD_LAZY
Each external function reference is resolved when the function is first
@ -108,6 +109,22 @@ However,
is useful to ensure that any undefined symbols are discovered during the
call to
.Fn dlopen .
.Pp
One of the following flags may be ORed into the
.Fa mode
argument:
.Bl -tag -width RTLD_GLOBALX
.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
from all other shared objects.
.It Dv RTLD_LOCAL
Symbols in this shared object and its DAG of needed objects will be
available for resolving undefined references only from other objects
in the same DAG. This is the default, but it may be specified
explicitly with this flag.
.El
.Pp
If
.Fn dlopen
fails, it returns a null pointer, and sets an error condition which may