include fixes
[unix-history] / usr / src / include / nlist.h
CommitLineData
1c7a0e38
SL
1/* nlist.h 4.1 83/05/03 */
2
3/*
4 * Format of a symbol table entry; this file is included by <a.out.h>
5 * and should be used if you aren't interested the a.out header
6 * or relocation information.
7 */
8struct nlist {
9 char *n_name; /* for use when in-core */
10 unsigned char n_type; /* type flag, i.e. N_TEXT etc; see below */
11 char n_other; /* unused */
12 short n_desc; /* see <stab.h> */
13 unsigned long n_value; /* value of this symbol (or sdb offset) */
14};
15#define n_hash n_desc /* used internally by ld */
16
17/*
18 * Simple values for n_type.
19 */
20#define N_UNDF 0x0 /* undefined */
21#define N_ABS 0x2 /* absolute */
22#define N_TEXT 0x4 /* text */
23#define N_DATA 0x6 /* data */
24#define N_BSS 0x8 /* bss */
25#define N_COMM 0x12 /* common (internal to ld) */
26#define N_FN 0x1f /* file name symbol */
27
28#define N_EXT 01 /* external bit, or'ed in */
29#define N_TYPE 0x1e /* mask for all the type bits */
30
31/*
32 * Sdb entries have some of the N_STAB bits set.
33 * These are given in <stab.h>
34 */
35#define N_STAB 0xe0 /* if any of these bits set, a SDB entry */
36
37/*
38 * Format for namelist values.
39 */
40#define N_FORMAT "%08x"