build failure on IRIX when building with Python support.
[deliverable/binutils-gdb.git] / gas / symbols.h
CommitLineData
252b5132 1/* symbols.h -
9758f3fc 2 Copyright 1987, 1990, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001,
aa820537 3 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
252b5132
RH
4
5 This file is part of GAS, the GNU Assembler.
6
7 GAS is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
ec2655a6 9 the Free Software Foundation; either version 3, or (at your option)
252b5132
RH
10 any later version.
11
12 GAS is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GAS; see the file COPYING. If not, write to the Free
4b4da160
NC
19 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
20 02110-1301, USA. */
252b5132 21
a01b9fa4 22extern struct obstack notes; /* eg FixS live here. */
252b5132
RH
23
24extern struct obstack cond_obstack; /* this is where we track .ifdef/.endif
25 (if we do that at all). */
26
27extern symbolS *symbol_rootP; /* all the symbol nodes */
28extern symbolS *symbol_lastP; /* last struct symbol we made, or NULL */
29
30extern symbolS abs_symbol;
4a826962 31extern symbolS dot_symbol;
252b5132
RH
32
33extern int symbol_table_frozen;
34
35/* This is non-zero if symbols are case sensitive, which is the
36 default. */
37extern int symbols_case_sensitive;
38
280d71bf
DB
39char * symbol_relc_make_expr (expressionS *);
40char * symbol_relc_make_sym (symbolS *);
41char * symbol_relc_make_value (offsetT);
74937d39
KH
42char *decode_local_label_name (char *s);
43symbolS *symbol_find (const char *name);
06e77878 44symbolS *symbol_find_noref (const char *name, int noref);
74937d39 45symbolS *symbol_find_exact (const char *name);
06e77878 46symbolS *symbol_find_exact_noref (const char *name, int noref);
74937d39
KH
47symbolS *symbol_find_or_make (const char *name);
48symbolS *symbol_make (const char *name);
49symbolS *symbol_new (const char *name, segT segment, valueT value,
50 fragS * frag);
51symbolS *symbol_create (const char *name, segT segment, valueT value,
52 fragS * frag);
9497f5ac
NC
53symbolS *symbol_clone (symbolS *, int);
54#undef symbol_clone_if_forward_ref
55symbolS *symbol_clone_if_forward_ref (symbolS *, int);
56#define symbol_clone_if_forward_ref(s) symbol_clone_if_forward_ref (s, 0)
74937d39
KH
57symbolS *symbol_temp_new (segT, valueT, fragS *);
58symbolS *symbol_temp_new_now (void);
59symbolS *symbol_temp_make (void);
60
61symbolS *colon (const char *sym_name);
62void local_colon (int n);
63void symbol_begin (void);
4a826962 64void dot_symbol_init (void);
74937d39
KH
65void symbol_print_statistics (FILE *);
66void symbol_table_insert (symbolS * symbolP);
67valueT resolve_symbol_value (symbolS *);
68void resolve_local_symbol_values (void);
2e1e12b1 69int snapshot_symbol (symbolS **, valueT *, segT *, fragS **);
74937d39
KH
70
71void print_symbol_value (symbolS *);
72void print_expr (expressionS *);
73void print_expr_1 (FILE *, expressionS *);
74void print_symbol_value_1 (FILE *, symbolS *);
75
76int dollar_label_defined (long l);
77void dollar_label_clear (void);
78void define_dollar_label (long l);
79char *dollar_label_name (long l, int augend);
80
81void fb_label_instance_inc (long label);
82char *fb_label_name (long n, long augend);
83
84extern void copy_symbol_attributes (symbolS *, symbolS *);
252b5132
RH
85
86/* Get and set the values of symbols. These used to be macros. */
74937d39
KH
87extern valueT S_GET_VALUE (symbolS *);
88extern void S_SET_VALUE (symbolS *, valueT);
252b5132 89
74937d39
KH
90extern int S_IS_FUNCTION (symbolS *);
91extern int S_IS_EXTERNAL (symbolS *);
92extern int S_IS_WEAK (symbolS *);
06e77878
AO
93extern int S_IS_WEAKREFR (symbolS *);
94extern int S_IS_WEAKREFD (symbolS *);
74937d39
KH
95extern int S_IS_COMMON (symbolS *);
96extern int S_IS_DEFINED (symbolS *);
97extern int S_FORCE_RELOC (symbolS *, int);
98extern int S_IS_DEBUG (symbolS *);
99extern int S_IS_LOCAL (symbolS *);
74937d39 100extern int S_IS_STABD (symbolS *);
9497f5ac
NC
101extern int S_IS_VOLATILE (const symbolS *);
102extern int S_IS_FORWARD_REF (const symbolS *);
74937d39
KH
103extern const char *S_GET_NAME (symbolS *);
104extern segT S_GET_SEGMENT (symbolS *);
105extern void S_SET_SEGMENT (symbolS *, segT);
106extern void S_SET_EXTERNAL (symbolS *);
977cdf5a 107extern void S_SET_NAME (symbolS *, const char *);
74937d39
KH
108extern void S_CLEAR_EXTERNAL (symbolS *);
109extern void S_SET_WEAK (symbolS *);
06e77878
AO
110extern void S_SET_WEAKREFR (symbolS *);
111extern void S_CLEAR_WEAKREFR (symbolS *);
112extern void S_SET_WEAKREFD (symbolS *);
113extern void S_CLEAR_WEAKREFD (symbolS *);
74937d39 114extern void S_SET_THREAD_LOCAL (symbolS *);
9497f5ac 115extern void S_SET_VOLATILE (symbolS *);
92757bc9 116extern void S_CLEAR_VOLATILE (symbolS *);
9497f5ac 117extern void S_SET_FORWARD_REF (symbolS *);
252b5132 118
49309057
ILT
119#ifndef WORKING_DOT_WORD
120struct broken_word
121 {
122 /* Linked list -- one of these structures per ".word x-y+C"
123 expression. */
124 struct broken_word *next_broken_word;
125 /* Segment and subsegment for broken word. */
126 segT seg;
127 subsegT subseg;
128 /* Which frag is this broken word in? */
129 fragS *frag;
130 /* Where in the frag is it? */
131 char *word_goes_here;
132 /* Where to add the break. */
133 fragS *dispfrag; /* where to add the break */
134 /* Operands of expression. */
135 symbolS *add;
136 symbolS *sub;
137 offsetT addnum;
138
47eebc20 139 int added; /* nasty thing happened yet? */
49309057
ILT
140 /* 1: added and has a long-jump */
141 /* 2: added but uses someone elses long-jump */
142
143 /* Pointer to broken_word with a similar long-jump. */
144 struct broken_word *use_jump;
145 };
146extern struct broken_word *broken_words;
147#endif /* ndef WORKING_DOT_WORD */
148
149/*
150 * Current means for getting from symbols to segments and vice verse.
151 * This will change for infinite-segments support (e.g. COFF).
152 */
153extern const segT N_TYPE_seg[]; /* subseg.c */
154
155#define SEGMENT_TO_SYMBOL_TYPE(seg) ( seg_N_TYPE [(int) (seg)] )
156extern const short seg_N_TYPE[];/* subseg.c */
157
158#define N_REGISTER 30 /* Fake N_TYPE value for SEG_REGISTER */
159
74937d39 160void symbol_clear_list_pointers (symbolS * symbolP);
49309057 161
74937d39
KH
162void symbol_insert (symbolS * addme, symbolS * target,
163 symbolS ** rootP, symbolS ** lastP);
164void symbol_remove (symbolS * symbolP, symbolS ** rootP,
165 symbolS ** lastP);
49309057 166
74937d39 167extern symbolS *symbol_previous (symbolS *);
49309057 168
74937d39 169void verify_symbol_chain (symbolS * rootP, symbolS * lastP);
74937d39
KH
170
171void symbol_append (symbolS * addme, symbolS * target,
172 symbolS ** rootP, symbolS ** lastP);
173
174extern symbolS *symbol_next (symbolS *);
175
176extern expressionS *symbol_get_value_expression (symbolS *);
177extern void symbol_set_value_expression (symbolS *, const expressionS *);
514d955d 178extern offsetT *symbol_X_add_number (symbolS *);
74937d39
KH
179extern void symbol_set_value_now (symbolS *);
180extern void symbol_set_frag (symbolS *, fragS *);
181extern fragS *symbol_get_frag (symbolS *);
182extern void symbol_mark_used (symbolS *);
183extern void symbol_clear_used (symbolS *);
184extern int symbol_used_p (symbolS *);
185extern void symbol_mark_used_in_reloc (symbolS *);
186extern void symbol_clear_used_in_reloc (symbolS *);
187extern int symbol_used_in_reloc_p (symbolS *);
188extern void symbol_mark_mri_common (symbolS *);
189extern void symbol_clear_mri_common (symbolS *);
190extern int symbol_mri_common_p (symbolS *);
191extern void symbol_mark_written (symbolS *);
192extern void symbol_clear_written (symbolS *);
193extern int symbol_written_p (symbolS *);
194extern void symbol_mark_resolved (symbolS *);
195extern int symbol_resolved_p (symbolS *);
196extern int symbol_section_p (symbolS *);
197extern int symbol_equated_p (symbolS *);
198extern int symbol_equated_reloc_p (symbolS *);
199extern int symbol_constant_p (symbolS *);
bdf128d6 200extern int symbol_shadow_p (symbolS *);
74937d39
KH
201extern asymbol *symbol_get_bfdsym (symbolS *);
202extern void symbol_set_bfdsym (symbolS *, asymbol *);
087d837e 203extern int symbol_same_p (symbolS *, symbolS *);
49309057
ILT
204
205#ifdef OBJ_SYMFIELD_TYPE
74937d39
KH
206OBJ_SYMFIELD_TYPE *symbol_get_obj (symbolS *);
207void symbol_set_obj (symbolS *, OBJ_SYMFIELD_TYPE *);
49309057
ILT
208#endif
209
210#ifdef TC_SYMFIELD_TYPE
74937d39
KH
211TC_SYMFIELD_TYPE *symbol_get_tc (symbolS *);
212void symbol_set_tc (symbolS *, TC_SYMFIELD_TYPE *);
49309057 213#endif
This page took 0.465146 seconds and 4 git commands to generate.