Commit | Line | Data |
---|---|---|
6cb100dd KM |
1 | .\" Copyright (c) 1980 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
56af27bc | 5 | .\" @(#)nlist.3 6.1 (Berkeley) %G% |
6cb100dd | 6 | .\" |
56af27bc | 7 | .TH NLIST 3 "" |
6cb100dd KM |
8 | .UC 4 |
9 | .SH NAME | |
10 | nlist \- get entries from name list | |
11 | .SH SYNOPSIS | |
12 | .nf | |
13 | .B #include <nlist.h> | |
a6d97bad | 14 | .PP |
6cb100dd KM |
15 | .B nlist(filename, nl) |
16 | .B char *filename; | |
17 | .B struct nlist nl[]; | |
18 | .fi | |
19 | .SH DESCRIPTION | |
20 | .I Nlist | |
a6d97bad KM |
21 | examines the name list in the given executable output file |
22 | and selectively extracts a list of values. | |
23 | The name list consists of an array of structures containing names, | |
6cb100dd KM |
24 | types and values. |
25 | The list is terminated with a null name. | |
a6d97bad | 26 | Each name is looked up in the name list of the file. |
6cb100dd KM |
27 | If the name is found, the type and value of the |
28 | name are inserted in the next two fields. | |
29 | If the name is not found, both entries are set to 0. | |
30 | See | |
31 | .IR a.out (5) | |
32 | for the structure declaration. | |
33 | .PP | |
a6d97bad | 34 | This subroutine is useful for examining the system name list kept in the file |
6cb100dd | 35 | .BR /vmunix . |
a6d97bad | 36 | In this way programs can obtain system addresses that are up to date. |
6cb100dd KM |
37 | .SH "SEE ALSO" |
38 | a.out(5) | |
39 | .SH DIAGNOSTICS | |
56af27bc KM |
40 | If the file cannot be found or if it is not a valid namelist \-1 is returned; |
41 | otherwise, the number of unfound namelist entries is returned. | |
42 | .PP | |
43 | The type entry is set to 0 if the symbol is not found. |