|
|
#include <syms.h>
File name_1.
Function_1.
[Weak name_1 for function_1]
...
Local symbols for function_1.
Function_2.
[Weak name_1 for function_2]
...
Local symbols for function_2.
...
Static externs for file_1.
File name_2.
Function_1.
[Weak name_1 for function_1]
...
Local symbols for function_1.
Function_2.
[Weak name_1 for function_2]
...
Local symbols for function_2.
...
Static externs for file_2.
...
Defined global symbols.
Undefined global symbols.
The entry for a symbol is a fixed-length structure. The members of the structure hold the name (null padded), its value, and other information. The C structure follows:
#define SYMNMLEN 8 #define FILNMLEN 14 #define DIMNUM 4struct syment { union /* all ways to get symbol name */ { char _n_name[SYMNMLEN]; /* symbol name */ struct { long _n_zeroes; /* == 0L when in string table */ long _n_offset; /* location of name in table */ } _n_n; char *_n_nptr[2]; /* allows overlaying */ } _n; long n_value; /* value of symbol */ short n_scnum; /* section number */ unsigned short n_type; /* type and derived type */ char n_sclass; /* storage class */ char n_numaux; /* number of aux entries */ };
#define n_name _n._n_name #define n_zeroes _n._n_n._n_zeroes #define n_offset _n._n_n._n_offset #define n_nptr _n._n_nptr[1]
Meaningful values and their explanations are given in both syms.h
and Common Object File Format (COFF).
To interpret the entries see these sources.
Some symbols require more information than a single
entry; they are followed by auxiliary entries
that are the same size as a symbol entry. The format follows.
union auxent { struct { long x_tagndx; union { struct { unsigned short x_lnno; unsigned short x_size; } x_lnsz; long x_fsize; } x_misc; union { struct { long x_lnnoptr; long x_endndx; } x_fcn; struct { unsigned short x_dimen[DIMNUM]; } x_ary; } x_fcnary; unsigned short x_tvndx; } x_sym;union { char x_fname[FILNMLEN]; struct { long x_zero; long x_offset; } x_longname; } x_file;
struct { long x_scnlen; unsigned short x_nreloc; unsigned short x_nlinno; } x_scn;
struct { long x_tvfill; unsigned short x_tvlen; unsigned short x_tvran[2]; } x_tv; };
Indexes of symbol table entries begin at zero.