From 24a6df9a6ed93833d0680b6f5bc0ccadcea8ab57 Mon Sep 17 00:00:00 2001 From: jdp Date: Tue, 19 Sep 2000 04:02:05 +0000 Subject: Make a somewhat unsatisfactory attempt to describe the effects of the RTLD_GLOBAL and RTLD_LOCAL flags which can be passed to dlopen(). --- lib/libc/gen/dlopen.3 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'lib/libc') diff --git a/lib/libc/gen/dlopen.3 b/lib/libc/gen/dlopen.3 index 66fa095..a91db05 100644 --- a/lib/libc/gen/dlopen.3 +++ b/lib/libc/gen/dlopen.3 @@ -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 -- cgit v1.1