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

  man pages->IRIX man pages -> standard/nlist (3)              
Title
Content
Arch
Section
 

Contents


NLIST(3X)							     NLIST(3X)


NAME    [Toc]    [Back]

     nlist, nlist64 - get entries from name list

SYNOPSIS    [Toc]    [Back]

     #include <nlist.h>

     int nlist(const char *filename, struct nlist *nl);
     int nlist64(const char *filename, struct nlist64 *nl);

     cc	... -lelf

DESCRIPTION    [Toc]    [Back]

     NOTE: The nlist function has moved	to the Elf library (-lelf).  Programs
     that need to use nlist must be linked with	the -lelf option (in IRIX4,
     nlist was in -lmld).

     nlist examines a section with Elf section type SHT_SYMTAB or SHT_DYNSYM
     (whichever	comes first in the Elf file) in	the given Elf file and
     selectively extracts a list of values.  The name list consists of an
     array of structures containing names, types and values.  The list is
     terminated	with a structure containing a NULL (a NULL pointer) n_name or
     zero-length n_name	(the first character of	the memory pointed to is 0).
     Each name is looked up in the name	list of	the file.  If the name is
     found, the	n_value	field is set to	the value of the symbol-table  entry's
     st_value and the n_type field is set to the value of the symbol-table
     entry's ELF32_ST_TYPE.  If	the name is not	found, n_value and n_type are
     set to 0.	nlist works on 32-bit Elf files	only (Elf header EI_CLASS
     ELFCLASS32).

     nlist64 works in the same manner as nlist but nlist64 works only on  64-
     bit Elf files (Elf	header	EI_CLASS  ELFCLASS64) and and uses
     ELF64_ST_TYPE to set the n_type field.

     The Elf symbol table is searched sequentially.

SEE ALSO    [Toc]    [Back]

      
      
     elf(4)

DIAGNOSTICS    [Toc]    [Back]

     If	the file cannot	be found or if it does not contain a valid Elf symbol
     table or if the object is not the right class (ELFCLASS32 for nlist(),
     ELFCLASS64	for nlist64()),	or if there is some other error, -1 is
     returned;

     On	success, 0 is returned.

NOTE    [Toc]    [Back]

     Standard UNIX System V Release 4 documentation is ambiguous as to whether
     the n_name	list terminator	field value should be a	NULL pointer or	a
     non-NULL pointer pointing to a string of length 0.	 Either	will work as a
     terminator	with this library.




									Page 1






NLIST(3X)							     NLIST(3X)



     In	general	there is only one symtab section of type SHT_SYMTAB or one
     symtab section of type SHT_DYNSYM in a file. Not both.  In	releases
     before IRIX6.2 some files had both, but that is no	longer true.  Both
     sections have the same format.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
XmFontListInitFontContext IRIX A font list function that allows applications to access the entries in a font list
XmFontListInitFontContext HP-UX A font list function that allows applications to access the entries in a font list
XmFontListInitFontContext Tru64 A font list function that allows applications to access the entries in a font list
nlist Tru64 gets entries from name list
DXmSvnGetHighlighted Tru64 Retrieves (returns) a list of entries currently highlighted by the user.
dmParamsScan IRIX scan all entries of a digital media parameter/value list
csa_list_entries HP-UX list the calendar entries that match all the attribute search criteria
man IRIX print entries from the on-line reference manuals; find manual entries by keyword
bptojdb Tru64 Converts bootptab entries into permanent, static IP entries for JOIN databases.
list_object HP-UX Lists the specifies object entries (including clearinghouse object entries)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service