Diffstat (limited to 'lib/csu/i386/dlopen.3')
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/csu/i386/dlopen.3 b/lib/csu/i386/dlopen.3
index 82651c6b510f..efd59be557f2 100644
@@ -152,6 +152,28 @@ returns a null pointer if the symbol cannot be found, and sets an error
condition which may be queried with
.Fn dlerror .
+is called with the special
+.Dv RTLD_NEXT ,
+then the search for the symbol is limited to the shared objects
+which were loaded after the one issuing the call to
+.Fn dlsym .
+Thus, if the function is called from the main program, all
+the shared libraries are searched.
+If it is called from a shared library, all subsequent shared
+libraries are searched.
+is useful for implementing wrappers around library functions.
+For example, a wrapper function
+could access the
+.Li dlsym(RTLD_NEXT, \&"_getpid\&") .
returns a null-terminated character string describing the last error that
occurred during a call to