syms(4) DG/UX 5.4.2 syms(4)
NAME
syms - common object file symbol table format
SYNOPSIS
#include <syms.h>
DESCRIPTION
Common object files contain information to support symbolic software
testing [see sdb(1)]. Line number entries [see linenum(4)] and
extensive symbolic information permit testing at the C source level.
Every object file's symbol table is organized as shown below.
File name 1.
Function 1.
Local symbols for function 1.
Function 2.
Local symbols for function 2.
...
Static externs for file 1.
File name 2.
Function 1.
Local symbols for function 1.
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 is given below.
#define SYMNMLEN 8
#define FILNMLEN 14
#define DIMNUM 4
struct syment
{
union /* all ways to get symbol name */
{
char nname[SYMNMLEN]; /* symbol name */
struct
{
long nzeroes; /* == 0L when in string table */
long noffset; /* location of name in table */
} nn;
char *nnptr[2]; /* allows overlaying */
} n;
long nvalue; /* value of symbol */
short nscnum; /* section number */
Licensed material--property of copyright holder(s) 1
syms(4) DG/UX 5.4.2 syms(4)
unsigned short ntype; /* type and derived type */
char nsclass; /* storage class */
char nnumaux; /* number of aux entries */
char npad1; /* pad to 4 byte multiple */
char npad2; /* pad to 4 byte multiple */
};
};
};
#define nname n.nname
#define nzeroes n.nn.nzeroes
#define noffset n.nn.noffset
#define nnptr n.nnptr[1]
Meaningful values and their explanations can be found in syms.h;.
anyone who needs to interpret the entries should seek more
information there. 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 xtagndx;
union
{
struct
{
unsigned short xlnno;
unsigned short xsize;
} xlnsz;
long xfsize;
} xmisc;
union
{
struct
{
long xlnnoptr;
long xendndx;
} xfcn;
struct
{
unsigned short xdimen[DIMNUM];
} xary;
} xfcnary;
unsigned short xtvndx;
char pad1;
char pad2;
} xsym;
struct
{
char xfname[FILNMLEN];
} xfile;
Licensed material--property of copyright holder(s) 2
syms(4) DG/UX 5.4.2 syms(4)
struct
{
long xscnlen;
unsigned short xnreloc;
unsigned short xnlinno;
} xscn;
struct
{
long xtvfill;
unsigned short xtvlen;
unsigned short xtvran[2];
} xtv;
};
Indexes of symbol table entries begin at zero.
SEE ALSO
sdb(1), a.out(4), linenum(4).
CAUTION
Symbols declared as type long are recorded in the symbol table as
type int.
Licensed material--property of copyright holder(s) 3