Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / export / sym.h
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
4 *
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
8 */
9
10 /*
11 * sym - symbol table definitions, VRMIX kernel pseudo-TOC
12 */
13
14 struct toc_syment {
15 #ifdef __XCOFF64__
16 unsigned long long n_value;
17 union {
18 struct {
19 int _n_offset; /* offset into string table */
20 } _n_n;
21 char *_n_nptr; /* Allows for overlaying */
22 } _n;
23 #else /* __XCOFF64__ */
24 union {
25 char _n_name[8]; /* old COFF version */
26 struct {
27 int _n_zeroes; /* new == 0 */
28 int _n_offset; /* offset into string table */
29 } _n_n;
30 char *_n_nptr[2]; /* allows for overlaying */
31 } _n;
32 int n_value; /* value of symbol */
33 #endif /* __XCOFF64__ */
34 };
35 #ifdef __XCOFF64__
36 #define n_nptr _n._n_nptr
37 #else
38 #define n_name _n._n_name
39 #define n_nptr _n._n_nptr[1]
40 #define n_zeroes _n._n_n._n_zeroes
41 #endif
42 #define n_offset _n._n_n._n_offset
43
44 typedef struct toc_syment sym_t;
45
46 extern struct toc_syment *toc_syms; /* symbol table */
47 extern caddr_t toc_strs; /* string table */
48 extern toc_nsyms; /* # symbols */
49 extern sym_t *sym_flex();
50 extern sym_t *sym_lookup();