Commit | Line | Data |
---|---|---|
bb0cfa24 DF |
1 | /* |
2 | * Copyright (c) 1980 Regents of the University of California. | |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | * | |
9822e909 | 6 | * @(#)nlist.h 5.2 (Berkeley) %G% |
bb0cfa24 | 7 | */ |
1c7a0e38 SL |
8 | |
9 | /* | |
10 | * Format of a symbol table entry; this file is included by <a.out.h> | |
11 | * and should be used if you aren't interested the a.out header | |
12 | * or relocation information. | |
13 | */ | |
14 | struct nlist { | |
15 | char *n_name; /* for use when in-core */ | |
16 | unsigned char n_type; /* type flag, i.e. N_TEXT etc; see below */ | |
17 | char n_other; /* unused */ | |
18 | short n_desc; /* see <stab.h> */ | |
19 | unsigned long n_value; /* value of this symbol (or sdb offset) */ | |
20 | }; | |
21 | #define n_hash n_desc /* used internally by ld */ | |
22 | ||
23 | /* | |
24 | * Simple values for n_type. | |
25 | */ | |
26 | #define N_UNDF 0x0 /* undefined */ | |
27 | #define N_ABS 0x2 /* absolute */ | |
28 | #define N_TEXT 0x4 /* text */ | |
29 | #define N_DATA 0x6 /* data */ | |
30 | #define N_BSS 0x8 /* bss */ | |
31 | #define N_COMM 0x12 /* common (internal to ld) */ | |
9822e909 | 32 | #define N_FN 0x1e /* file name symbol */ |
1c7a0e38 SL |
33 | |
34 | #define N_EXT 01 /* external bit, or'ed in */ | |
35 | #define N_TYPE 0x1e /* mask for all the type bits */ | |
36 | ||
37 | /* | |
38 | * Sdb entries have some of the N_STAB bits set. | |
39 | * These are given in <stab.h> | |
40 | */ | |
41 | #define N_STAB 0xe0 /* if any of these bits set, a SDB entry */ | |
42 | ||
43 | /* | |
44 | * Format for namelist values. | |
45 | */ | |
46 | #define N_FORMAT "%08x" |