Commit | Line | Data |
---|---|---|
44422485 KB |
1 | /*- |
2 | * Copyright (c) 1991 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
5 | * %sccs.include.redist.c% | |
bb0cfa24 | 6 | * |
44422485 | 7 | * @(#)nlist.h 5.6 (Berkeley) %G% |
bb0cfa24 | 8 | */ |
1c7a0e38 | 9 | |
44422485 KB |
10 | #ifndef _NLIST_H_ |
11 | #define _NLIST_H_ | |
1c7a0e38 SL |
12 | |
13 | /* | |
44422485 KB |
14 | * Symbol table entry format. The #ifdef's are so that programs including |
15 | * nlist.h can initialize nlist structures statically. | |
1c7a0e38 | 16 | */ |
44422485 KB |
17 | struct nlist { |
18 | #ifdef _AOUT_INCLUDE_ | |
19 | union { | |
20 | char *n_name; /* symbol name (in memory) */ | |
21 | long n_strx; /* file string table offset (on disk) */ | |
22 | } n_un; | |
23 | #else | |
24 | char *n_name; /* symbol name (in memory) */ | |
25 | #endif | |
26 | ||
27 | #define N_UNDF 0x00 /* undefined */ | |
28 | #define N_ABS 0x02 /* absolute address */ | |
29 | #define N_TEXT 0x04 /* text segment */ | |
30 | #define N_DATA 0x06 /* data segment */ | |
31 | #define N_BSS 0x08 /* bss segment */ | |
32 | #define N_COMM 0x12 /* common reference */ | |
33 | #define N_FN 0x1e /* file name */ | |
34 | ||
35 | #define N_EXT 0x01 /* external (global) bit, OR'ed in */ | |
1c7a0e38 | 36 | #define N_TYPE 0x1e /* mask for all the type bits */ |
44422485 | 37 | unsigned char n_type; /* type defines */ |
1c7a0e38 | 38 | |
44422485 KB |
39 | char n_other; /* spare */ |
40 | #define n_hash n_desc /* used internally by ld(1); XXX */ | |
41 | short n_desc; /* used by stab entries */ | |
42 | unsigned long n_value; /* address/value of the symbol */ | |
43 | }; | |
1c7a0e38 | 44 | |
44422485 KB |
45 | #define N_FORMAT "%08x" /* namelist value format; XXX */ |
46 | #define N_STAB 0x0e0 /* mask for debugger symbols -- stab(5) */ | |
f7532098 | 47 | |
91befe9c KB |
48 | #include <sys/cdefs.h> |
49 | ||
50 | __BEGIN_DECLS | |
51 | int nlist __P((const char *, struct nlist *)); | |
52 | __END_DECLS | |
44422485 KB |
53 | |
54 | #endif /* !_NLIST_H_ */ |