xref: /original-bsd/lib/libc/gen/nlist.3 (revision e58c8952)
1.\" Copyright (c) 1980, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)nlist.3	8.3 (Berkeley) 04/19/94
7.\"
8.Dd
9.Dt NLIST 3
10.Os BSD 4
11.Sh NAME
12.Nm nlist
13.Nd retrieve symbol table name list from an executable file
14.Sh SYNOPSIS
15.Fd #include <nlist.h>
16.Ft int
17.Fn nlist "const char *filename" "struct nlist *nl"
18.Sh DESCRIPTION
19The
20.Fn nlist
21function
22retrieves name list entries from the symbol table of an
23executable file. (See
24.Xr a.out 5 . )
25The argument
26.Fa \&nl
27is set to reference the
28beginning of the list.
29The list is preened of binary and invalid data;
30if an entry in the
31name list is valid, the
32.Fa n_type
33and
34.Fa n_value
35for the entry are copied into the list
36referenced by
37.Fa \&nl .
38No other data is copied.
39The last entry in the list is always
40.Dv NULL .
41.Sh RETURN VALUES
42The number of invalid entries is returned if successful; otherwise,
43if the file
44.Fa filename
45does not exist or is not executable, the returned value is \-1.
46.Sh SEE ALSO
47.Xr a.out 5
48.Sh HISTORY
49A
50.Fn nlist
51function appeared in
52.At v6 .
53