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