diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2002-12-18 10:13:54 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2002-12-18 10:13:54 +0000 |
commit | 95f4226b2755f1600e3bf4e32e8aa0db0886c280 (patch) | |
tree | d7fc87dbba410fea9fb526ffb94f2409d3c5f8cc /lib/libc/gen/dlopen.3 | |
parent | b92cc9b8783fe78fa7d6f4ad6b005d29e28cd99c (diff) | |
download | src-95f4226b2755f1600e3bf4e32e8aa0db0886c280.tar.gz src-95f4226b2755f1600e3bf4e32e8aa0db0886c280.zip |
Notes
Diffstat (limited to 'lib/libc/gen/dlopen.3')
-rw-r--r-- | lib/libc/gen/dlopen.3 | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/libc/gen/dlopen.3 b/lib/libc/gen/dlopen.3 index c1c09e4436da..ba37c6f2c9a6 100644 --- a/lib/libc/gen/dlopen.3 +++ b/lib/libc/gen/dlopen.3 @@ -60,7 +60,9 @@ program's address space, to obtain the address bindings of symbols defined by such objects, and to remove such objects when their use is no longer required. .Pp +The .Fn dlopen +function provides access to the shared object in .Fa path , returning a descriptor that can be used for later @@ -141,7 +143,9 @@ fails, it returns a null pointer, and sets an error condition which may be interrogated with .Fn dlerror . .Pp +The .Fn dlsym +function returns the address binding of the symbol described in the null-terminated character string .Fa symbol , @@ -225,17 +229,23 @@ interface, below, should be used, since .Fn getpid is a function and not a data object.) .Pp +The .Fn dlsym +function returns a null pointer if the symbol cannot be found, and sets an error condition which may be queried with .Fn dlerror . .Pp +The .Fn dlfunc +function implements all of the behavior of .Fn dlsym , but has a return type which can be cast to a function pointer without triggering compiler diagnostics. -.Fn ( dlsym +(The +.Fn dlsym +function returns a data pointer; in the C standard, conversions between data and function pointer types are undefined. Some compilers and @@ -246,7 +256,9 @@ The precise return type of is unspecified; applications must cast it to an appropriate function pointer type. .Pp +The .Fn dlerror +function returns a null-terminated character string describing the last error that occurred during a call to .Fn dlopen , @@ -266,7 +278,9 @@ to where the second call follows the first immediately, the second call will always return a null pointer. .Pp +The .Fn dlclose +function deletes a reference to the shared object referenced by .Fa handle . If the reference count drops to 0, the object is removed from the @@ -306,12 +320,16 @@ still the case when using the (obsolete) .Fl aout option to the C language compiler. .Sh ERRORS +The .Fn dlopen , .Fn dlsym , and .Fn dlfunc +functions return a null pointer in the event of errors. +The .Fn dlclose +function returns 0 on success, or -1 if an error occurred. Whenever an error has been detected, a message detailing it can be retrieved via a call to |