Standards / Extensions | C or C++ | Dependencies |
---|---|---|
z/OS® UNIX | both |
#include <nlist.h>
int nlist(const char *loadname, struct nlist *np);
The nlist() function allows a program to examine the name list in the executable file named by the loadname parameter. It selectively extracts a list of values and places them in the array of nlist structures pointed to by the np parameter.
The name list specified by the np parameter consists of an array of structures containing names of variables, types and values. The list is terminated with an element that has a NULL string in the name structure member. Each variable name is looked up in the name list of the executable file. If the name is found, the type and the value of the name is copied into the nlist structure field. If the name is not found, both the type and value entry will be set to zero.
If successful, nlist() returns 0. The offset and type of functions if found will be returned in the nlist structure.
If unsuccessful, nlist() returns -1.