source: trunk/src/binutils/gas/symbols.h@ 896

Last change on this file since 896 was 610, checked in by bird, 22 years ago

This commit was generated by cvs2svn to compensate for changes in r609,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 7.6 KB
Line 
1/* symbols.h -
2 Copyright 1987, 1990, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001,
3 2002, 2003 Free Software Foundation, Inc.
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
9 the Free Software Foundation; either version 2, or (at your option)
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
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
21
22#ifdef BFD_ASSEMBLER
23/* The BFD code wants to walk the list in both directions. */
24#undef SYMBOLS_NEED_BACKPOINTERS
25#define SYMBOLS_NEED_BACKPOINTERS
26#endif
27
28#ifndef BFD_ASSEMBLER
29/* The non-BFD code expects to be able to manipulate the symbol fields
30 directly. */
31#include "struc-symbol.h"
32#endif
33
34extern struct obstack notes; /* eg FixS live here. */
35
36extern struct obstack cond_obstack; /* this is where we track .ifdef/.endif
37 (if we do that at all). */
38
39extern symbolS *symbol_rootP; /* all the symbol nodes */
40extern symbolS *symbol_lastP; /* last struct symbol we made, or NULL */
41
42extern symbolS abs_symbol;
43
44extern int symbol_table_frozen;
45
46/* This is non-zero if symbols are case sensitive, which is the
47 default. */
48extern int symbols_case_sensitive;
49
50char *decode_local_label_name PARAMS ((char *s));
51symbolS *symbol_find PARAMS ((const char *name));
52symbolS *symbol_find_exact PARAMS ((const char *name));
53symbolS *symbol_find_base PARAMS ((const char *name, int strip_underscore));
54symbolS *symbol_find_or_make PARAMS ((const char *name));
55symbolS *symbol_make PARAMS ((const char *name));
56symbolS *symbol_new PARAMS ((const char *name, segT segment, valueT value,
57 fragS * frag));
58symbolS *symbol_create PARAMS ((const char *name, segT segment, valueT value,
59 fragS * frag));
60symbolS *colon PARAMS ((const char *sym_name));
61void local_colon PARAMS ((int n));
62void symbol_begin PARAMS ((void));
63void symbol_print_statistics PARAMS ((FILE *));
64void symbol_table_insert PARAMS ((symbolS * symbolP));
65valueT resolve_symbol_value PARAMS ((symbolS *));
66void resolve_local_symbol_values PARAMS ((void));
67
68void print_symbol_value PARAMS ((symbolS *));
69void print_expr PARAMS ((expressionS *));
70void print_expr_1 PARAMS ((FILE *, expressionS *));
71void print_symbol_value_1 PARAMS ((FILE *, symbolS *));
72
73int dollar_label_defined PARAMS ((long l));
74void dollar_label_clear PARAMS ((void));
75void define_dollar_label PARAMS ((long l));
76char *dollar_label_name PARAMS ((long l, int augend));
77
78void fb_label_instance_inc PARAMS ((long label));
79char *fb_label_name PARAMS ((long n, long augend));
80
81extern void copy_symbol_attributes PARAMS ((symbolS *, symbolS *));
82
83/* Get and set the values of symbols. These used to be macros. */
84extern valueT S_GET_VALUE PARAMS ((symbolS *));
85extern void S_SET_VALUE PARAMS ((symbolS *, valueT));
86
87#ifdef BFD_ASSEMBLER
88extern int S_IS_FUNCTION PARAMS ((symbolS *));
89extern int S_IS_EXTERNAL PARAMS ((symbolS *));
90extern int S_IS_WEAK PARAMS ((symbolS *));
91extern int S_IS_COMMON PARAMS ((symbolS *));
92extern int S_IS_DEFINED PARAMS ((symbolS *));
93extern int S_FORCE_RELOC PARAMS ((symbolS *, int));
94extern int S_IS_DEBUG PARAMS ((symbolS *));
95extern int S_IS_LOCAL PARAMS ((symbolS *));
96extern int S_IS_EXTERN PARAMS ((symbolS *));
97extern int S_IS_STABD PARAMS ((symbolS *));
98extern const char *S_GET_NAME PARAMS ((symbolS *));
99extern segT S_GET_SEGMENT PARAMS ((symbolS *));
100extern void S_SET_SEGMENT PARAMS ((symbolS *, segT));
101extern void S_SET_EXTERNAL PARAMS ((symbolS *));
102extern void S_SET_NAME PARAMS ((symbolS *, char *));
103extern void S_CLEAR_EXTERNAL PARAMS ((symbolS *));
104extern void S_SET_WEAK PARAMS ((symbolS *));
105extern void S_SET_THREAD_LOCAL PARAMS ((symbolS *));
106#endif
107
108#ifndef WORKING_DOT_WORD
109struct broken_word
110 {
111 /* Linked list -- one of these structures per ".word x-y+C"
112 expression. */
113 struct broken_word *next_broken_word;
114 /* Segment and subsegment for broken word. */
115 segT seg;
116 subsegT subseg;
117 /* Which frag is this broken word in? */
118 fragS *frag;
119 /* Where in the frag is it? */
120 char *word_goes_here;
121 /* Where to add the break. */
122 fragS *dispfrag; /* where to add the break */
123 /* Operands of expression. */
124 symbolS *add;
125 symbolS *sub;
126 offsetT addnum;
127
128 int added; /* nasty thing happend yet? */
129 /* 1: added and has a long-jump */
130 /* 2: added but uses someone elses long-jump */
131
132 /* Pointer to broken_word with a similar long-jump. */
133 struct broken_word *use_jump;
134 };
135extern struct broken_word *broken_words;
136#endif /* ndef WORKING_DOT_WORD */
137
138/*
139 * Current means for getting from symbols to segments and vice verse.
140 * This will change for infinite-segments support (e.g. COFF).
141 */