MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


ELF Library Functions                          elfgetarsym(3ELF)



NAME
     elfgetarsym - retrieve archive symbol table

SYNOPSIS
     cc [ flag ... ] file ... -lelf [ library ... ]
     #include 

     ElfArsym *elfgetarsym(Elf *elf, sizet *ptr);


DESCRIPTION
     The elfgetarsym() function returns a pointer to the archive
     symbol  table,  if  one  is available for the ELF descriptor
     elf. Otherwise, the archive doesn't have a symbol table,  an
     error occurred, or elf was null; elfgetarsym() then returns
     a null value. The symbol table is  an  array  of  structures
     that include the following members.

       char *asname;
       sizet    asoff;
       unsigned long  ashash;



     These members have the following semantics:

     asname    A  pointer  to  a  null-terminated  symbol   name
                resides here.


     asoff     This value is a byte offset from the beginning of
                the  archive  to the member's header. The archive
                member residing at the given offset  defines  the
                associated symbol. Values in asoff may be passed
                as arguments to elfrand().  See  elfbegin(3ELF)
                to access the desired archive member.


     ashash    This is a hash value for the name, as computed by
                elfhash().



     If ptr is non-null, the library stores the number  of  table
     entries  in  the location to which ptr points. This value is
     set to 0 when the return value is  NUL.  The  table's  last
     entry, which is included in the count, has a null asname, a
     zero value for asoff, and ~0UL for ashash.


     The hash value returned is guaranteed not to be the bit pat-
     tern of all ones ( ~0UL).



SunOS 5.11          Last change: 11 Jul 2001                    1






ELF Library Functions                          elfgetarsym(3ELF)



ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Stable                      
    
     MT-Level                     MT-Safe                     
    


SEE ALSO
     ar.h(3HEAD), elf(3ELF), elfbegin(3ELF), elfgetarhdr(3ELF),
     elfhash(3ELF), libelf(3LIB), attributes(5)





































SunOS 5.11          Last change: 11 Jul 2001                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™