1 /* MIPS `ECOFF' symbol table external format.
2 Copyright 1992 Free Software Foundation.
3 Contributed by Cygnus Support. Written by John Gilmore.
5 This file is part of GDB.
7 This program 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 of the License, or
10 (at your option) any later version.
12 This program 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.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
21 /* ECOFF uses COFF-like section structures, but its own symbol format.
22 This file defines the symbol format in fields whose size and alignment
23 will not vary on different host systems. The bfd module coff-msym.c
24 converts between external and internal forms of this information,
25 deals with byte order issues, etc. */
27 /* File header as a set of bytes */
34 char h_cbLineOffset
[4];
40 char h_cbSymOffset
[4];
42 char h_cbOptOffset
[4];
44 char h_cbAuxOffset
[4];
48 char h_cbSsExtOffset
[4];
52 char h_cbRfdOffset
[4];
54 char h_cbExtOffset
[4];
57 /* File descriptor external record */
78 char f_cbLineOffset
[4];
82 #define FDR_BITS1_LANG_BIG 0xF8
83 #define FDR_BITS1_LANG_SH_BIG 3
84 #define FDR_BITS1_LANG_LITTLE 0x1F
85 #define FDR_BITS1_LANG_SH_LITTLE 0
87 #define FDR_BITS1_FMERGE_BIG 0x04
88 #define FDR_BITS1_FMERGE_LITTLE 0x20
90 #define FDR_BITS1_FREADIN_BIG 0x02
91 #define FDR_BITS1_FREADIN_LITTLE 0x40
93 #define FDR_BITS1_FBIGENDIAN_BIG 0x01
94 #define FDR_BITS1_FBIGENDIAN_LITTLE 0x80
96 #define FDR_BITS2_GLEVEL_BIG 0xC0
97 #define FDR_BITS2_GLEVEL_SH_BIG 6
98 #define FDR_BITS2_GLEVEL_LITTLE 0x03
99 #define FDR_BITS2_GLEVEL_SH_LITTLE 0
101 /* We ignore the `reserved' field in bits2. */
104 /* Procedure descriptor external record */
114 char p_fregoffset
[4];
115 char p_frameoffset
[4];
120 char p_cbLineOffset
[4];
129 /* Symbol external record */
140 #define SYM_BITS1_ST_BIG 0xFC
141 #define SYM_BITS1_ST_SH_BIG 2
142 #define SYM_BITS1_ST_LITTLE 0x3F
143 #define SYM_BITS1_ST_SH_LITTLE 0
145 #define SYM_BITS1_SC_BIG 0x03
146 #define SYM_BITS1_SC_SH_LEFT_BIG 3
147 #define SYM_BITS1_SC_LITTLE 0xC0
148 #define SYM_BITS1_SC_SH_LITTLE 6
150 #define SYM_BITS2_SC_BIG 0xE0
151 #define SYM_BITS2_SC_SH_BIG 5
152 #define SYM_BITS2_SC_LITTLE 0x07
153 #define SYM_BITS2_SC_SH_LEFT_LITTLE 2
155 #define SYM_BITS2_RESERVED_BIG 0x10
156 #define SYM_BITS2_RESERVED_LITTLE 0x08
158 #define SYM_BITS2_INDEX_BIG 0x0F
159 #define SYM_BITS2_INDEX_SH_LEFT_BIG 16
160 #define SYM_BITS2_INDEX_LITTLE 0xF0
161 #define SYM_BITS2_INDEX_SH_LITTLE 4
163 #define SYM_BITS3_INDEX_SH_LEFT_BIG 8
164 #define SYM_BITS3_INDEX_SH_LEFT_LITTLE 4
166 #define SYM_BITS4_INDEX_SH_LEFT_BIG 0
167 #define SYM_BITS4_INDEX_SH_LEFT_LITTLE 12
169 /* External symbol external record */
175 struct sym_ext es_asym
;
178 #define EXT_BITS1_JMPTBL_BIG 0x80
179 #define EXT_BITS1_JMPTBL_LITTLE 0x01
181 #define EXT_BITS1_COBOL_MAIN_BIG 0x40
182 #define EXT_BITS1_COBOL_MAIN_LITTLE 0x02
184 #define EXT_BITS1_WEAKEXT_BIG 0x20
185 #define EXT_BITS1_WEAKEXT_LITTLE 0x04
187 /* Type information external record */
196 #define TIR_BITS1_FBITFIELD_BIG 0x80
197 #define TIR_BITS1_FBITFIELD_LITTLE 0x01
199 #define TIR_BITS1_CONTINUED_BIG 0x40
200 #define TIR_BITS1_CONTINUED_LITTLE 0x02
202 #define TIR_BITS1_BT_BIG 0x3F
203 #define TIR_BITS1_BT_SH_BIG 0
204 #define TIR_BITS1_BT_LITTLE 0xFC
205 #define TIR_BITS1_BT_SH_LITTLE 2
207 #define TIR_BITS_TQ4_BIG 0xF0
208 #define TIR_BITS_TQ4_SH_BIG 4
209 #define TIR_BITS_TQ5_BIG 0x0F
210 #define TIR_BITS_TQ5_SH_BIG 0
211 #define TIR_BITS_TQ4_LITTLE 0x0F
212 #define TIR_BITS_TQ4_SH_LITTLE 0
213 #define TIR_BITS_TQ5_LITTLE 0xF0
214 #define TIR_BITS_TQ5_SH_LITTLE 4
216 #define TIR_BITS_TQ0_BIG 0xF0
217 #define TIR_BITS_TQ0_SH_BIG 4
218 #define TIR_BITS_TQ1_BIG 0x0F
219 #define TIR_BITS_TQ1_SH_BIG 0
220 #define TIR_BITS_TQ0_LITTLE 0x0F
221 #define TIR_BITS_TQ0_SH_LITTLE 0
222 #define TIR_BITS_TQ1_LITTLE 0xF0
223 #define TIR_BITS_TQ1_SH_LITTLE 4
225 #define TIR_BITS_TQ2_BIG 0xF0
226 #define TIR_BITS_TQ2_SH_BIG 4
227 #define TIR_BITS_TQ3_BIG 0x0F
228 #define TIR_BITS_TQ3_SH_BIG 0
229 #define TIR_BITS_TQ2_LITTLE 0x0F
230 #define TIR_BITS_TQ2_SH_LITTLE 0
231 #define TIR_BITS_TQ3_LITTLE 0xF0
232 #define TIR_BITS_TQ3_SH_LITTLE 4
235 /* Relative symbol external record */
241 #define RNDX_BITS0_RFD_SH_LEFT_BIG 4
242 #define RNDX_BITS1_RFD_BIG 0xF0
243 #define RNDX_BITS1_RFD_SH_BIG 4
245 #define RNDX_BITS0_RFD_SH_LEFT_LITTLE 0
246 #define RNDX_BITS1_RFD_LITTLE 0x0F
247 #define RNDX_BITS1_RFD_SH_LEFT_LITTLE 8
249 #define RNDX_BITS1_INDEX_BIG 0x0F
250 #define RNDX_BITS1_INDEX_SH_LEFT_BIG 16
251 #define RNDX_BITS2_INDEX_SH_LEFT_BIG 8
252 #define RNDX_BITS3_INDEX_SH_LEFT_BIG 0
254 #define RNDX_BITS1_INDEX_LITTLE 0xF0
255 #define RNDX_BITS1_INDEX_SH_LITTLE 4
256 #define RNDX_BITS2_INDEX_SH_LEFT_LITTLE 4
257 #define RNDX_BITS3_INDEX_SH_LEFT_LITTLE 12
260 /* Dense numbers external record */
267 /* Auxliliary symbol information external record */
271 struct rndx_ext a_rndx
;
280 /* FIXME! These are copied from ../bfd/libbfd.h */
281 PROTO (bfd_vma
, _do_getb32
, (unsigned char *addr
));
282 PROTO (bfd_vma
, _do_getl32
, (unsigned char *addr
));
284 #define AUX_GET_DNLOW(bigend, ax) (bigend? _do_getb32 ((ax)->a_dnLow): \
285 _do_getl32 ((ax)->a_dnLow))
286 #define AUX_GET_DNHIGH(bigend, ax) (bigend? _do_getb32 ((ax)->a_dnHigh): \
287 _do_getl32 ((ax)->a_dnHigh))
288 #define AUX_GET_ISYM(bigend, ax) (bigend? _do_getb32 ((ax)->a_isym): \
289 _do_getl32 ((ax)->a_isym))
290 #define AUX_GET_ISS(bigend, ax) (bigend? _do_getb32 ((ax)->a_iss): \
291 _do_getl32 ((ax)->a_iss))
292 #define AUX_GET_WIDTH(bigend, ax) (bigend? _do_getb32 ((ax)->a_width): \
293 _do_getl32 ((ax)->a_width))
294 #define AUX_GET_COUNT(bigend, ax) (bigend? _do_getb32 ((ax)->a_count): \
295 _do_getl32 ((ax)->a_count))
297 /* Relative file descriptor */
This page took 0.035231 seconds and 4 git commands to generate.