White space and comment changes. #ifdef __STDC__ becomes #if __STDC__
[deliverable/binutils-gdb.git] / gas / struc-symbol.h
CommitLineData
fecd2382 1/* struct_symbol.h - Internal symbol structure
3340f7e5 2 Copyright (C) 1987, 1992 Free Software Foundation, Inc.
a39116f1
RP
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 2, 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 oYou 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. */
fecd2382
RP
19
20struct symbol /* our version of an nlist node */
21{
a39116f1
RP
22 obj_symbol_type sy_symbol; /* what we write in .o file (if permitted) */
23 unsigned long sy_name_offset; /* 4-origin position of sy_name in symbols */
24 /* part of object file. */
25 /* 0 for (nameless) .stabd symbols. */
26 /* Not used until write_object_file() time. */
27 long sy_number; /* 24 bit symbol number. */
28 /* Symbol numbers start at 0 and are */
29 /* unsigned. */
30 struct symbol *sy_next; /* forward chain, or NULL */
fecd2382 31#ifdef SYMBOLS_NEED_BACKPOINTERS
a39116f1 32 struct symbol *sy_previous; /* backward chain, or NULL */
fecd2382 33#endif /* SYMBOLS_NEED_BACKPOINTERS */
a39116f1
RP
34 struct frag *sy_frag; /* NULL or -> frag this symbol attaches to. */
35 struct symbol *sy_forward; /* value is really that of this other symbol */
36 /* We will probably want to add a sy_segment here soon. */
fecd2382
RP
37};
38
39typedef struct symbol symbolS;
40
41typedef unsigned valueT; /* The type of n_value. Helps casting. */
42
43#ifndef WORKING_DOT_WORD
44struct broken_word {
45 struct broken_word *next_broken_word;/* One of these strucs per .word x-y */
46 fragS *frag; /* Which frag its in */
47 char *word_goes_here;/* Where in the frag it is */
48 fragS *dispfrag; /* where to add the break */
49 symbolS *add; /* symbol_x */
50 symbolS *sub; /* - symbol_y */
51 long addnum; /* + addnum */
52 int added; /* nasty thing happend yet? */
a39116f1
RP
53 /* 1: added and has a long-jump */
54 /* 2: added but uses someone elses long-jump */
fecd2382
RP
55 struct broken_word *use_jump; /* points to broken_word with a similar
56 long-jump */
57};
58extern struct broken_word *broken_words;
59#endif /* ndef WORKING_DOT_WORD */
60
61/*
62 * Current means for getting from symbols to segments and vice verse.
63 * This will change for infinite-segments support (e.g. COFF).
64 */
65/* #define SYMBOL_TYPE_TO_SEGMENT(symP) ( N_TYPE_seg [(int) (symP)->sy_type & N_TYPE] ) */
66extern segT N_TYPE_seg[]; /* subseg.c */
67
68#define SEGMENT_TO_SYMBOL_TYPE(seg) ( seg_N_TYPE [(int) (seg)] )
69extern const short seg_N_TYPE[]; /* subseg.c */
70
71#define N_REGISTER 30 /* Fake N_TYPE value for SEG_REGISTER */
72
73#ifdef SYMBOLS_NEED_BACKPOINTERS
3340f7e5 74#if __STDC__ == 1
fecd2382
RP
75
76void symbol_clear_list_pointers(symbolS *symbolP);
77void symbol_insert(symbolS *addme, symbolS *target, symbolS **rootP, symbolS **lastP);
78void symbol_remove(symbolS *symbolP, symbolS **rootP, symbolS **lastP);
79void verify_symbol_chain(symbolS *rootP, symbolS *lastP);
80
3340f7e5 81#else /* not __STDC__ */
fecd2382
RP
82
83void symbol_clear_list_pointers();
84void symbol_insert();
85void symbol_remove();
86void verify_symbol_chain();
87
3340f7e5 88#endif /* not __STDC__ */
fecd2382
RP
89
90#define symbol_previous(s) ((s)->sy_previous)
91
92#else /* SYMBOLS_NEED_BACKPOINTERS */
93
94#define symbol_clear_list_pointers(clearme) {clearme->sy_next = NULL;}
95
96#endif /* SYMBOLS_NEED_BACKPOINTERS */
97
3340f7e5 98#if __STDC__ == 1
fecd2382 99void symbol_append(symbolS *addme, symbolS *target, symbolS **rootP, symbolS **lastP);
3340f7e5 100#else /* not __STDC__ */
fecd2382 101void symbol_append();
3340f7e5 102#endif /* not __STDC__ */
fecd2382
RP
103
104#define symbol_next(s) ((s)->sy_next)
105
106/*
107 * Local Variables:
108 * comment-column: 0
109 * fill-column: 131
110 * End:
111 */
112
113/* end of struc-symbol.h */
This page took 0.045096 seconds and 4 git commands to generate.