Commit | Line | Data |
---|---|---|
ae59e04c CL |
1 | .\" Copyright (c) 1980, 1991 Regents of the University of California. |
2 | .\" All rights reserved. | |
6cb100dd | 3 | .\" |
ae59e04c | 4 | .\" %sccs.include.redist.man% |
6cb100dd | 5 | .\" |
ae59e04c CL |
6 | .\" @(#)nlist.3 6.2 (Berkeley) %G% |
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 | |
19 | The | |
20 | .Fn nlist | |
21 | function | |
22 | retrieves name list entries from the symbol table of an | |
23 | exectutable file. (See | |
24 | .Xr a.out 5 . ) | |
25 | The argument | |
26 | .Fa \&nl | |
27 | is set to reference the | |
28 | beginning of the list. | |
29 | The list is preened of binary and invalid data; | |
30 | if an entry in the | |
31 | name list is valid, the | |
32 | .Fa n_type | |
33 | and | |
34 | .Fa n_value | |
35 | for the entry are copied into the list | |
36 | referenced by | |
37 | .Fa \&nl . | |
38 | No other data is copied. | |
39 | The last entry in the list is always | |
40 | .Dv NULL . | |
41 | .Sh RETURN VALUES | |
42 | The number of invalid entries is returned if successful; otherwise, | |
43 | if the file | |
44 | .Fa filename | |
45 | does not exist or is not exectuable, the returned value is \-1. | |
46 | .Sh SEE ALSO | |
47 | .Xr a.out 5 | |
48 | .Sh HISTORY | |
49 | A | |
50 | .Fn nlist | |
51 | function appeared in | |
52 | .At v6 . |