Download i960 Processor Software Utilities User`s Guide

Transcript
C
Common Object File Format (COFF) and Common Archive File Format (CAFF)
Table C-9
Symbol Table Entry Format
Bytes
Declaration
0-7
Name
Definition
_n
the name of a pointer or of a symbol
8-11
long int
n_value
symbol value; storage class
dependent
12-13
short
n_scnum
section number of symbol
14-15
unsigned short
n_flags
pic, pid flags for the module
containing the symbol, flag when
symbol is a section name
16-19
unsigned long
n_type
basic and derived type specification
20
char
n_sclass
storage class
21
char
n_numaux
number of auxiliary entries
22-23
char
pad2[2]
padding to force alignment
Structure for Symbol Table Entries
Example C-7 shows the C language structure declaration for the symbol
table entry that can be found in the coff.h header file.
Example C-7 Symbol Table Entry Declaration
#define
SYMNMLEN
8
/* Number of characters in a
symbol name */
struct syment {
union {
char
_n_name[SYMNMLEN];
/* symbol name
struct {
long
_n_zeroes; /* zero - name in string table
long
_n_offset;
/* offset into string table
} _n_n;
char
*_n_nptr[2];
/* allows for overlaying
} _n;
long
n_value;
/* value of symbol
short
n_scnum;
/* section number
*/
*/
*/
*/
*/
*/
continued ☛
C-17