|
|
#include <x.out.h>int xlist (filename, xl) char *filename; struct xlist xl[];
#include <x.out.h> #include <stdio.h>int fxlist (fp, xl) FILE *fp; struct xlist xl [];
fxlist- gets name list entries from file pointer
The fxlist and xlist macros examine the name list in an OMF or COFF executable and selectively extract values.
fxlist performs the same function as xlist, except that fxlist accepts a pointer to a previously opened file instead of a filename.
xlist examines the name list in the given executable output file and selectively extracts a list of values. The given executable file can be either OMF format or COFF. The name list structure xl consists of an array of xlist structures containing names, types, values, and segment values (if applicable). The list is terminated by either a pointer to a null name or a null pointer. Each name is looked up in the name list of the file. If the name is found, the type and value of the name are inserted into the next two fields. The segment value (if it exists) is inserted in the third field. If the name is not found, both entries are set to zero. See a.out(FP) for a discussion of the xlist structure.
x.out and a.out formats are understood, as well as 8086 relocatable and x.out segmented formats.
If the symbol table is in a.out format, and if the symbol name given to xlist is longer than eight characters, only the first eight characters are used for comparison. In all other cases, the name given to xlist must be the same length as a name list entry in order to match.
If two or more symbols happen to match the name given to xlist, then the type and value used are those of the last symbol found.