|
|
1.1 root 1: /* struct_symbol.h - Internal symbol structure
2: Copyright (C) 1987 Free Software Foundation, Inc.
3:
4: This file is part of GAS, the GNU Assembler.
5:
6: GAS is free software; you can redistribute it and/or modify
7: it under the terms of the GNU General Public License as published by
8: the Free Software Foundation; either version 1, or (at your option)
9: any later version.
10:
11: GAS is distributed in the hope that it will be useful,
12: but WITHOUT ANY WARRANTY; without even the implied warranty of
13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: GNU General Public License for more details.
15:
16: You should have received a copy of the GNU General Public License
17: along with GAS; see the file COPYING. If not, write to
18: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19:
20: #ifdef NeXT
21: #import <mach-o/nlist.h>
22: #else /* !defined(NeXT) */
23: #ifndef VMS
24: #include "a.out.h" /* Needed to define struct nlist. Sigh. */
25: #else
26: #include "a_out.h"
27: #endif
28: #endif /* defined(NeXT) */
29:
30: struct symbol /* our version of an nlist node */
31: {
32: struct nlist sy_nlist; /* what we write in .o file (if permitted) */
33: long unsigned sy_name_offset; /* 1-origin position of sy_name in symbols */
34: /* part of object file. */
35: /* 0 for (nameless) .stabd symbols. */
36: /* Not used until write_object() time. */
37: long int sy_number; /* 24 bit symbol number. */
38: /* Symbol numbers start at 0 and are */
39: /* unsigned. */
40: struct symbol *sy_next; /* forward chain, or NULL */
41: struct frag *sy_frag; /* NULL or -> frag this symbol attaches to. */
42: struct symbol *sy_forward; /* value is really that of this other symbol */
43: };
44:
45: typedef struct symbol symbolS;
46:
47: #define sy_name sy_nlist .n_un. n_name
48: /* Name field always points to a string. */
49: /* 0 means .stabd-like anonymous symbol. */
50: #define sy_type sy_nlist. n_type
51: #ifdef NeXT
52: #define sy_other sy_nlist. n_sect
53: #else
54: #define sy_other sy_nlist. n_other
55: #endif
56: #define sy_desc sy_nlist. n_desc
57: #define sy_value sy_nlist. n_value
58: /* Value of symbol is this value + object */
59: /* file address of sy_frag. */
60: typedef unsigned valueT; /* The type of n_value. Helps casting. */
61:
62: struct indirect_symbol {
63: char *isy_name; /* name of the indirect */
64: struct frag *isy_frag; /* frag this indirect attaches to */
65: unsigned long isy_offset; /* offset into frag this attaches to */
66: struct symbol *isy_symbol; /* symbol for the indirect */
67: struct indirect_symbol *isy_next; /* forward chain, or NULL */
68: };
69: typedef struct indirect_symbol isymbolS;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.