|
|
1.1 root 1: .TH NLIST 3
2: .CT 2 debug_tune
3: .SH NAME
4: nlist \(mi get entries from name list
5: .SH SYNOPSIS
6: .nf
7: .B #include <nlist.h>
8: .B nlist(filename, nl)
9: .B char *filename;
10: .B struct nlist nl[];
11: .fi
12: .SH DESCRIPTION
13: .I Nlist
14: examines the name list in
15: the given executable output file
16: and selectively extracts a
17: list of values.
18: The list is terminated with a null name.
19: .nf
20: .ftL
21: .ta \w'\fLstruct 'u +\w'\fLunsigned long n_value; 'u
22: struct nlist {
23: \fLchar *n_name;\fR symbol name
24: \fLunsigned char n_type;\fP type flag
25: \fLchar n_other;\fP unused
26: \fLshort n_desc;\fP unused
27: \fLunsigned long n_value;\fP value (or offset) of this symbol
28: \fL};\fP
29: .fi
30: Each name is looked up in the name list of
31: the file.
32: If the name is found, the type and value of the
33: name are inserted in
34: .L n_type
35: and
36: .L n_value
37: respectively.
38: If the name is not found, both entries are set to 0.
39: .PP
40: This subroutine is useful for
41: examining the system name list kept in
42: .FR /unix .
43: In this way programs can obtain system addresses
44: that are up to date.
45: .SH "SEE ALSO"
46: .IR a.out (5)
47: .SH DIAGNOSTICS
48: All
49: type entries are set to 0
50: if the file cannot be found
51: or if it is not a valid namelist.
52: .SH BUGS
53: On some
54: .SM UNIX
55: systems you must include
56: .F <a.out.h>
57: rather than
58: .FR <nlist.h> .
59: This is unfortunate, but
60: .F <a.out.h>
61: can't be used on the
62: VAX because it contains a union,
63: which can't be initialized.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.