Penguin

Differences between current version and revision by previous author of dladdr(3).

Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History

Newer page: version 3 Last edited on Wednesday, October 1, 2003 8:18:07 am by CraigBox
Older page: version 1 Last edited on Tuesday, September 30, 2003 4:04:24 pm by SamJansen Revert
@@ -1,31 +1,19 @@
-!!DLADDR(3) FreeBSD Library Functions Manual DLADDR(3)  
-  
-  
 !!NAME 
-  
  
 __dladdr__ -- find the shared object containing a given address 
-  
  
 !!LIBRARY 
-  
  
 Standard C Library (libc, -lc) 
-  
  
 !!SYNOPSIS 
  
-  
- __#include <dlfcn.h>__  
-  
-  
-  
+__#include <dlfcn.h>__ %%%  
 __''int''__ __dladdr__(__''const void *addr''__, __''Dl''_''info *info''__); 
  
  
 !!DESCRIPTION 
-  
  
 The __dladdr__() function queries the dynamic linker for information about the shared object containing the address __''addr''__. The information is returned in the structure specified by __''info''__. The structure contains at least the following members: 
  
  const char *dli_fname 
@@ -43,9 +31,9 @@
 The __dladdr__() function is available only in dynamically linked programs. 
  
 !!ERRORS 
  
-If a mapped shared object containing __''addr''__ cannot be found, __dladdr__() returns . In that case, a message detailing the failure can be retrieved by calling _dlerror__(). 
+If a mapped shared object containing __''addr''__ cannot be found, __dladdr__() returns . In that case, a message detailing the failure can be retrieved by calling _ _dlerror__(). 
  
 On success, a non-zero value is returned. 
  
  
@@ -67,13 +55,10 @@
 This implementation is bug-compatible with the Solaris implementation. 
  
 In particular, the following bugs are present: 
  
-* If __''addr''__ lies in the main executable rather than in a shared library, the pathname returned in __''dli''_''fname''__ may not be correct. The pathname is taken directly from __''argv[[]''__ of the calling process. When executing a program specified by its full pathname, most shells set __''argv[[]''__ to the pathname. But this is not required of shells or guaranteed by the operating system. 
+* If __''addr''__ lies in the main executable rather than in a shared library, the pathname returned in __''dli''_''fname''__ may not be correct. The pathname is taken directly from __''argv[[]''__ of the calling process. When executing a program specified by its full pathname, most shells set __''argv[[]''__ to the pathname. But this is not required of shells or guaranteed by the operating system. 
  
  
-* If __''addr''__ is of the form __''&func''__, where __''func''__ is a global function, its value may be an unpleasant surprise. In dynamically linked programs, the address of a global function is considered to point to its program linkage table entry, rather than to the entry point of the function itself. This causes most global functions to appear to be defined within the main executable, rather than in the shared libraries where the actual code resides.  
-  
+* If __''addr''__ is of the form __''&func''__, where __''func''__ is a global function, its value may be an unpleasant surprise. In dynamically linked programs, the address of a global function is considered to point to its program linkage table entry, rather than to the entry point of the function itself. This causes most global functions to appear to be defined within the main executable, rather than in the shared libraries where the actual code resides. 
  
 * Returning 0 as an indication of failure goes against long-standing Unix tradition. 
-  
-!!FreeBSD 5.1 February 5, 1998 FreeBSD 5.1  
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.