NLIST(3) BSD Library Functions Manual NLIST(3)NAME
nlist -- retrieve symbol table name list from an executable file
Utility functions from BSD systems (libbsd, -lbsd)
nlist(const char *filename, struct nlist *nl);
The nlist() function retrieves name list entries from the symbol table of an executable file (see a.out(5)). The argument nl is set to ref-
erence the beginning of the list. The list is preened of binary and invalid data; if an entry in the name list is valid, the n_type and
n_value for the entry are copied into the list referenced by nl. No other data is copied. The last entry in the list is always NULL.
The number of invalid entries is returned if successful; otherwise, if the file filename does not exist or is not executable, the returned
value is -1.
SEE ALSO a.out(5)HISTORY
A nlist() function appeared in Version 6 AT&T UNIX.
BSD April 19, 1994 BSD
Check Out this Related Man Page
nlist(3UCB) SunOS/BSD Compatibility Library Functions nlist(3UCB)NAME
nlist - get entries from symbol table
/usr/ucb/cc [ flag ... ] file ...
int nlist(filename, nl)
struct nlist *nl;
nlist() examines the symbol table from the executable image whose name is pointed to by filename, and selectively extracts a list of values
and puts them in the array of nlist structures pointed to by nl. The name list pointed to by nl consists of an array of structures contain-
ing names, types and values. The n_name field of each such structure is taken to be a pointer to a character string representing a symbol
name. The list is terminated by an entry with a NULL pointer (or a pointer to a NULL string) in the n_name field. For each entry in nl, if
the named symbol is present in the executable image's symbol table, its value and type are placed in the n_value and n_type fields. If a
symbol cannot be located, the corresponding n_type field of nl is set to zero.
Upon normal completion, nlist() returns the number of symbols that were not located in the symbol table. If an error occurs, nlist()
returns -1 and sets all of the n_type fields in members of the array pointed to by nl to zero.
SEE ALSO cc(1B), nlist(3ELF), a.out(4)NOTES
Use of these interfaces should be restricted to only applications written on BSD platforms. Use of these interfaces with any of the system
libraries or in multi-thread applications is unsupported.
Only the n_value field is compatibly set. Other fields in the nlist structure are filled with the ELF (Executable and Linking Format)
values (see nlist(3ELF) and a.out(4)).
SunOS 5.11 30 Oct 2007 nlist(3UCB)
I have encountered a problem that I cannot resolve. We have two
different AIX 5.3 boxes. On one box, regardless of whether it is
booted in 32 bit mode or 64 bit mode, I can obtain kernel metrics (i.e,
using kernel symbol names sysinfo or avenrun) via the nlink or nlink64
system call. On... (0 Replies)
I have a AIX 5.3 Installation on the Power5 processor. I am using the knlist API for getting the details of the CPU details like user cpu, kernel cpu, idle cpu and wait cpu. My code is working fine on other Installations of AIX like PowerPC_POWER4 but it is giving wrong values on Power5... (0 Replies)
I have written an application which reports the CPU information like user cpu%, sys cpu%, idle cpu% and wait cpu%. The application is built on an AIX 5.1 machine. The appliaction runs fine on AIX 5.1 and 5.2 and their results match with that of the topas command. But when I run the... (1 Reply)
We are using HP-UX. Previously we were using ftp to connect to remote list the text file name and copy into local file with .ls extension. For this we are using nlist RBOBAR*.txt DMSFT.ls now we want to convert the integration with sftp. So In sftp nlist command is not supported. How can we... (8 Replies)