xref: /csrg-svn/lib/libc/gen/nlist.3 (revision 66952)
161111Sbostic.\" Copyright (c) 1980, 1991, 1993
261111Sbostic.\"	The Regents of the University of California.  All rights reserved.
320403Smckusick.\"
448352Scael.\" %sccs.include.redist.man%
520403Smckusick.\"
6*66952Sbostic.\"     @(#)nlist.3	8.3 (Berkeley) 04/19/94
748352Scael.\"
848352Scael.Dd
948352Scael.Dt NLIST 3
1048352Scael.Os BSD 4
1148352Scael.Sh NAME
1248352Scael.Nm nlist
1348352Scael.Nd retrieve symbol table name list from an executable file
1448352Scael.Sh SYNOPSIS
1548352Scael.Fd #include <nlist.h>
1648352Scael.Ft int
1748352Scael.Fn nlist "const char *filename" "struct nlist *nl"
1848352Scael.Sh DESCRIPTION
1948352ScaelThe
2048352Scael.Fn nlist
2148352Scaelfunction
2248352Scaelretrieves name list entries from the symbol table of an
23*66952Sbosticexecutable file. (See
2448352Scael.Xr a.out 5 . )
2548352ScaelThe argument
2648352Scael.Fa \&nl
2748352Scaelis set to reference the
2848352Scaelbeginning of the list.
2948352ScaelThe list is preened of binary and invalid data;
3048352Scaelif an entry in the
3148352Scaelname list is valid, the
3248352Scael.Fa n_type
3348352Scaeland
3448352Scael.Fa n_value
3548352Scaelfor the entry are copied into the list
3648352Scaelreferenced by
3748352Scael.Fa \&nl .
3848352ScaelNo other data is copied.
3948352ScaelThe last entry in the list is always
4048352Scael.Dv NULL .
4148352Scael.Sh RETURN VALUES
4248352ScaelThe number of invalid entries is returned if successful; otherwise,
4348352Scaelif the file
4448352Scael.Fa filename
4565099Smckusickdoes not exist or is not executable, the returned value is \-1.
4648352Scael.Sh SEE ALSO
4748352Scael.Xr a.out 5
4848352Scael.Sh HISTORY
4948352ScaelA
5048352Scael.Fn nlist
5148352Scaelfunction appeared in
5248352Scael.At v6 .
53