Add support for v850E2 and v850E2V3
[binutils.git] / include / coff / m88k.h
blob8e1b3c93006606f592f5221d37a67952d8c63bfe
1 /* coff information for 88k bcs
3 Copyright 2001, 2010 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 3 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,
18 MA 02110-1301, USA. */
20 #define DO_NOT_DEFINE_SCNHDR
21 #define L_LNNO_SIZE 4
22 #define DO_NOT_DEFINE_SYMENT
23 #define DO_NOT_DEFINE_AUXENT
24 #include "coff/external.h"
26 #define MC88MAGIC 0540 /* 88k BCS executable */
27 #define MC88DMAGIC 0541 /* DG/UX executable */
28 #define MC88OMAGIC 0555 /* Object file */
30 #define MC88BADMAG(x) (((x).f_magic != MC88MAGIC) \
31 && ((x).f_magic != MC88DMAGIC) \
32 && ((x).f_magic != MC88OMAGIC))
34 #define PAGEMAGIC3 0414 /* Split i&d, zero mapped */
35 #define PAGEMAGICBCS 0413
37 /********************** SECTION HEADER **********************/
39 struct external_scnhdr
41 char s_name[8]; /* section name */
42 char s_paddr[4]; /* physical address, aliased s_nlib */
43 char s_vaddr[4]; /* virtual address */
44 char s_size[4]; /* section size */
45 char s_scnptr[4]; /* file ptr to raw data for section */
46 char s_relptr[4]; /* file ptr to relocation */
47 char s_lnnoptr[4]; /* file ptr to line numbers */
48 char s_nreloc[4]; /* number of relocation entries */
49 char s_nlnno[4]; /* number of line number entries*/
50 char s_flags[4]; /* flags */
53 #define SCNHDR struct external_scnhdr
54 #define SCNHSZ 44
56 /* Names of "special" sections. */
57 #define _TEXT ".text"
58 #define _DATA ".data"
59 #define _BSS ".bss"
60 #define _COMMENT ".comment"
63 /********************** SYMBOLS **********************/
65 #define E_SYMNMLEN 8 /* # characters in a symbol name */
66 #define E_FILNMLEN 14 /* # characters in a file name */
67 #define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
69 struct external_syment
71 union
73 char e_name[E_SYMNMLEN];
75 struct
77 char e_zeroes[4];
78 char e_offset[4];
79 } e;
81 } e;
83 char e_value[4];
84 char e_scnum[2];
85 char e_type[2];
86 char e_sclass[1];
87 char e_numaux[1];
88 char pad2[2];
91 #define N_BTMASK 017
92 #define N_TMASK 060
93 #define N_BTSHFT 4
94 #define N_TSHIFT 2
96 /* Note that this isn't the same shape as other coffs */
97 union external_auxent
99 struct
101 char x_tagndx[4]; /* str, un, or enum tag indx */
102 /* 4 */
104 union
106 char x_fsize[4]; /* size of function */
108 struct
110 char x_lnno[4]; /* declaration line number */
111 char x_size[4]; /* str/union/array size */
112 } x_lnsz;
114 } x_misc;
116 /* 12 */
117 union
119 struct /* if ISFCN, tag, or .bb */
121 char x_lnnoptr[4]; /* ptr to fcn line # */
122 char x_endndx[4]; /* entry ndx past block end */
123 } x_fcn;
125 struct /* if ISARY, up to 4 dimen. */
127 char x_dimen[E_DIMNUM][2];
128 } x_ary;
130 } x_fcnary;
131 /* 20 */
133 } x_sym;
135 union
137 char x_fname[E_FILNMLEN];
139 struct
141 char x_zeroes[4];
142 char x_offset[4];
143 } x_n;
145 } x_file;
147 struct
149 char x_scnlen[4]; /* section length */
150 char x_nreloc[4]; /* # relocation entries */
151 char x_nlinno[4]; /* # line numbers */
152 } x_scn;
154 struct
156 char x_tvfill[4]; /* tv fill value */
157 char x_tvlen[2]; /* length of .tv */
158 char x_tvran[2][2]; /* tv range */
159 } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
162 #define GET_LNSZ_SIZE(abfd, ext) \
163 H_GET_32 (abfd, ext->x_sym.x_misc.x_lnsz.x_size)
164 #define GET_LNSZ_LNNO(abfd, ext) \
165 H_GET_32 (abfd, ext->x_sym.x_misc.x_lnsz.x_lnno)
166 #define PUT_LNSZ_LNNO(abfd, in, ext) \
167 H_PUT_32 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_lnno)
168 #define PUT_LNSZ_SIZE(abfd, in, ext) \
169 H_PUT_32 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_size)
170 #define GET_SCN_NRELOC(abfd, ext) \
171 H_GET_32 (abfd, ext->x_scn.x_nreloc)
172 #define GET_SCN_NLINNO(abfd, ext) \
173 H_GET_32 (abfd, ext->x_scn.x_nlinno)
174 #define PUT_SCN_NRELOC(abfd, in, ext) \
175 H_PUT_32 (abfd, in, ext->x_scn.x_nreloc)
176 #define PUT_SCN_NLINNO(abfd, in, ext) \
177 H_PUT_32 (abfd,in, ext->x_scn.x_nlinno)
179 #define SYMENT struct external_syment
180 #define SYMESZ 20
181 #define AUXENT union external_auxent
182 #define AUXESZ 20
184 /********************** RELOCATION DIRECTIVES **********************/
186 struct external_reloc
188 char r_vaddr[4];
189 char r_symndx[4];
190 char r_type[2];
191 char r_offset[2];
194 #define RELOC struct external_reloc
195 #define RELSZ 12
197 #define NO_TVNDX