78ed81a3 |
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 | #ifndef VMS |
21 | #include "a.out.gnu.h" /* Needed to define struct nlist. Sigh. */ |
22 | #else |
23 | #include "a_out.h" |
24 | #endif |
25 | |
26 | struct symbol /* our version of an nlist node */ |
27 | { |
28 | struct nlist sy_nlist; /* what we write in .o file (if permitted) */ |
29 | long unsigned sy_name_offset; /* 4-origin position of sy_name in symbols */ |
30 | /* part of object file. */ |
31 | /* 0 for (nameless) .stabd symbols. */ |
32 | /* Not used until write_object_file() time. */ |
33 | long int sy_number; /* 24 bit symbol number. */ |
34 | /* Symbol numbers start at 0 and are */ |
35 | /* unsigned. */ |
36 | struct symbol * sy_next; /* forward chain, or NULL */ |
37 | struct frag * sy_frag; /* NULL or -> frag this symbol attaches to. */ |
38 | struct symbol *sy_forward; /* value is really that of this other symbol */ |
39 | }; |
40 | |
41 | typedef struct symbol symbolS; |
42 | |
43 | #define sy_name sy_nlist .n_un. n_name |
44 | /* Name field always points to a string. */ |
45 | /* 0 means .stabd-like anonymous symbol. */ |
46 | #define sy_type sy_nlist. n_type |
47 | #define sy_other sy_nlist. n_other |
48 | #define sy_desc sy_nlist. n_desc |
49 | #define sy_value sy_nlist. n_value |
50 | /* Value of symbol is this value + object */ |
51 | /* file address of sy_frag. */ |
52 | |
53 | typedef unsigned valueT; /* The type of n_value. Helps casting. */ |
54 | |
55 | /* end: struct_symbol.h */ |
56 | #ifndef WORKING_DOT_WORD |
57 | struct broken_word { |
58 | struct broken_word *next_broken_word;/* One of these strucs per .word x-y */ |
59 | fragS *frag; /* Which frag its in */ |
60 | char *word_goes_here;/* Where in the frag it is */ |
61 | fragS *dispfrag; /* where to add the break */ |
62 | symbolS *add; /* symbol_x */ |
63 | symbolS *sub; /* - symbol_y */ |
64 | long addnum; /* + addnum */ |
65 | int added; /* nasty thing happend yet? */ |
66 | /* 1: added and has a long-jump */ |
67 | /* 2: added but uses someone elses long-jump */ |
68 | struct broken_word *use_jump; /* points to broken_word with a similar |
69 | long-jump */ |
70 | }; |
71 | extern struct broken_word *broken_words; |
72 | #endif |