* config/tc-mips.c (mips_fix_loongson2f, mips_fix_loongson2f_nop,
[binutils/dougsmingw.git] / include / coff / m88k.h
blob9aeff1e6b857030c0595f6c0759d47320867a7db
1 /* coff information for 88k bcs
3 Copyright 2001 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
19 #define DO_NOT_DEFINE_SCNHDR
20 #define L_LNNO_SIZE 4
21 #define DO_NOT_DEFINE_SYMENT
22 #define DO_NOT_DEFINE_AUXENT
23 #include "coff/external.h"
25 #define MC88MAGIC 0540 /* 88k BCS executable */
26 #define MC88DMAGIC 0541 /* DG/UX executable */
27 #define MC88OMAGIC 0555 /* Object file */
29 #define MC88BADMAG(x) (((x).f_magic != MC88MAGIC) \
30 && ((x).f_magic != MC88DMAGIC) \
31 && ((x).f_magic != MC88OMAGIC))
33 #define PAGEMAGIC3 0414 /* Split i&d, zero mapped */
34 #define PAGEMAGICBCS 0413
36 /********************** SECTION HEADER **********************/
38 struct external_scnhdr
40 char s_name[8]; /* section name */
41 char s_paddr[4]; /* physical address, aliased s_nlib */
42 char s_vaddr[4]; /* virtual address */
43 char s_size[4]; /* section size */
44 char s_scnptr[4]; /* file ptr to raw data for section */
45 char s_relptr[4]; /* file ptr to relocation */
46 char s_lnnoptr[4]; /* file ptr to line numbers */
47 char s_nreloc[4]; /* number of relocation entries */
48 char s_nlnno[4]; /* number of line number entries*/
49 char s_flags[4]; /* flags */
52 #define SCNHDR struct external_scnhdr
53 #define SCNHSZ 44
55 /* Names of "special" sections. */
56 #define _TEXT ".text"
57 #define _DATA ".data"
58 #define _BSS ".bss"
59 #define _COMMENT ".comment"
62 /********************** SYMBOLS **********************/
64 #define E_SYMNMLEN 8 /* # characters in a symbol name */
65 #define E_FILNMLEN 14 /* # characters in a file name */
66 #define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
68 struct external_syment
70 union
72 char e_name[E_SYMNMLEN];
74 struct
76 char e_zeroes[4];
77 char e_offset[4];
78 } e;
80 } e;
82 char e_value[4];
83 char e_scnum[2];
84 char e_type[2];
85 char e_sclass[1];
86 char e_numaux[1];
87 char pad2[2];
90 #define N_BTMASK 017
91 #define N_TMASK 060
92 #define N_BTSHFT 4
93 #define N_TSHIFT 2
95 /* Note that this isn't the same shape as other coffs */
96 union external_auxent
98 struct
100 char x_tagndx[4]; /* str, un, or enum tag indx */
101 /* 4 */
103 union
105 char x_fsize[4]; /* size of function */
107 struct
109 char x_lnno[4]; /* declaration line number */
110 char x_size[4]; /* str/union/array size */
111 } x_lnsz;
113 } x_misc;
115 /* 12 */
116 union
118 struct /* if ISFCN, tag, or .bb */
120 char x_lnnoptr[4]; /* ptr to fcn line # */
121 char x_endndx[4]; /* entry ndx past block end */
122 } x_fcn;
124 struct /* if ISARY, up to 4 dimen. */
126 char x_dimen[E_DIMNUM][2];
127 } x_ary;
129 } x_fcnary;
130 /* 20 */
132 } x_sym;
134 union
136 char x_fname[E_FILNMLEN];
138 struct
140 char x_zeroes[4];
141 char x_offset[4];
142 } x_n;
144 } x_file;
146 struct
148 char x_scnlen[4]; /* section length */
149 char x_nreloc[4]; /* # relocation entries */
150 char x_nlinno[4]; /* # line numbers */
151 } x_scn;
153 struct
155 char x_tvfill[4]; /* tv fill value */
156 char x_tvlen[2]; /* length of .tv */
157 char x_tvran[2][2]; /* tv range */
158 } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
161 #define GET_LNSZ_SIZE(abfd, ext) \
162 H_GET_32 (abfd, ext->x_sym.x_misc.x_lnsz.x_size)
163 #define GET_LNSZ_LNNO(abfd, ext) \
164 H_GET_32 (abfd, ext->x_sym.x_misc.x_lnsz.x_lnno)
165 #define PUT_LNSZ_LNNO(abfd, in, ext) \
166 H_PUT_32 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_lnno)
167 #define PUT_LNSZ_SIZE(abfd, in, ext) \
168 H_PUT_32 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_size)
169 #define GET_SCN_NRELOC(abfd, ext) \
170 H_GET_32 (abfd, ext->x_scn.x_nreloc)
171 #define GET_SCN_NLINNO(abfd, ext) \
172 H_GET_32 (abfd, ext->x_scn.x_nlinno)
173 #define PUT_SCN_NRELOC(abfd, in, ext) \
174 H_PUT_32 (abfd, in, ext->x_scn.x_nreloc)
175 #define PUT_SCN_NLINNO(abfd, in, ext) \
176 H_PUT_32 (abfd,in, ext->x_scn.x_nlinno)
178 #define SYMENT struct external_syment
179 #define SYMESZ 20
180 #define AUXENT union external_auxent
181 #define AUXESZ 20
183 /********************** RELOCATION DIRECTIVES **********************/
185 struct external_reloc
187 char r_vaddr[4];
188 char r_symndx[4];
189 char r_type[2];
190 char r_offset[2];
193 #define RELOC struct external_reloc
194 #define RELSZ 12
196 #define NO_TVNDX