1nlist(3UCB) SunOS/BSD Compatibility Library Functions nlist(3UCB)
2
3
4
6 nlist - get entries from symbol table
7
9 /usr/ucb/cc [ flag ... ] file ...
10 #include <nlist.h>
11
12 int nlist(filename, nl)
13 char *filename;
14 struct nlist *nl;
15
16
18 nlist() examines the symbol table from the executable image whose name
19 is pointed to by filename, and selectively extracts a list of values
20 and puts them in the array of nlist structures pointed to by nl. The
21 name list pointed to by nl consists of an array of structures contain‐
22 ing names, types and values. The n_name field of each such structure is
23 taken to be a pointer to a character string representing a symbol name.
24 The list is terminated by an entry with a NULL pointer (or a pointer to
25 a NULL string) in the n_name field. For each entry in nl, if the named
26 symbol is present in the executable image's symbol table, its value and
27 type are placed in the n_value and n_type fields. If a symbol cannot be
28 located, the corresponding n_type field of nl is set to zero.
29
31 Upon normal completion, nlist() returns the number of symbols that were
32 not located in the symbol table. If an error occurs, nlist() returns −1
33 and sets all of the n_type fields in members of the array pointed to by
34 nl to zero.
35
37 nlist(3ELF), a.out(4)
38
40 Use of these interfaces should be restricted to only applications writ‐
41 ten on BSD platforms. Use of these interfaces with any of the system
42 libraries or in multi-thread applications is unsupported.
43
44
45 Only the n_value field is compatibly set. Other fields in the nlist
46 structure are filled with the ELF (Executable and Linking Format) val‐
47 ues (see nlist(3ELF) and a.out(4)).
48
49
50
51SunOS 5.11 30 Oct 2007 nlist(3UCB)