*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> dladdr (3)              
Title
Content
Arch
Section
 

dladdr(3)

Contents


NAME    [Toc]    [Back]

       dladdr - translate address to symbolic information

SYNOPSIS    [Toc]    [Back]

       #include   <stdio.h>   #define   __EXTENSIONS__   #include
       <dlfcn.h>

       int dladdr(
               void *address,
               Dl_info *dlip );

PARAMETERS    [Toc]    [Back]

       Specifies the address for the symbol being sought.  Specifies
 the preallocated Dl_info structure that dladdr() will
       fill in based on the specified address.

DESCRIPTION    [Toc]    [Back]

       The dladdr() function is one of a family of routines  that
       give the user direct access to the dynamic linking facilities.
 It can only be used in dynamically linked processes.

       The  dladdr()  function  determines  whether the specified
       address is located within one of the mapped  objects  that
       make  up  the  current  application's  address  space.  An
       address is considered to be within a mapped object when it
       is  between  the  base address and the end address of that
       object.  If a mapped object fits this criteria, the loader
       searches  the  object's symbol table to locate the nearest
       symbol to the specified address.

       The Dl_info structure includes the following members:

       const char *  dli_fname; void  *         dli_fbase;  const
       char *  dli_sname; void *        dli_saddr;

       Descriptions  of  these members are as follows: Pointer to
       the file name of the containing object.  The base  address
       of  the  containing  object.   Pointer  to the symbol name
       nearest to the specified address. This symbol  either  had
       the  same  address  or  is the nearest symbol with a lower
       address.  The actual address of the symbol pointed  to  by
       the dli_sname member.

       The Dl_info pointer elements point to addresses within the
       mapped objects. These may become invalid  if  objects  are
       removed   prior   to   these   elements  being  used  (see
       dlclose(3)).

RETURN VALUES    [Toc]    [Back]

       If the specified address cannot be  matched  to  a  mapped
       object,  a  0  (zero)  is  returned.  Otherwise, a nonzero
       returned is made and the associated Dl_info  elements  are
       filled.

       If  no  symbol is found to describe the specified address,
       both the dli_sname and the dli_saddr members are set to 0.






SEE ALSO    [Toc]    [Back]

      
      
       Functions: dlclose(3), dlerror(3), dlopen(3), dlsym(3)



                                                        dladdr(3)
[ Back ]
 Similar pages
Name OS Title
inet_lnaof Tru64 Translate an Internet address integer into its host (local) address component
inet_network Tru64 Translate an Internet dot-formatted address string to a network address integer
inet_netof Tru64 Translate an Internet address into its network address component
inet_addr Tru64 Translate an Internet network address string to an Internet address integer
inet_makeaddr Tru64 Translate an Internet network address and
inet_ntoa Tru64 Translate an Internet address into a dot-formatted character string
stdump Tru64 Dump portions of a file containing symbolic information
strmode FreeBSD convert inode status information into a symbolic string
strmode OpenBSD convert inode status information into a symbolic string
strmode NetBSD convert inode status information into a symbolic string
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service