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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
19 #define DO_NOT_DEFINE_SCNHDR
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
55 /* Names of "special" sections. */
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
72 char e_name
[E_SYMNMLEN
];
95 /* Note that this isn't the same shape as other coffs */
100 char x_tagndx
[4]; /* str, un, or enum tag indx */
105 char x_fsize
[4]; /* size of function */
109 char x_lnno
[4]; /* declaration line number */
110 char x_size
[4]; /* str/union/array size */
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 */
124 struct /* if ISARY, up to 4 dimen. */
126 char x_dimen
[E_DIMNUM
][2];
136 char x_fname
[E_FILNMLEN
];
148 char x_scnlen
[4]; /* section length */
149 char x_nreloc
[4]; /* # relocation entries */
150 char x_nlinno
[4]; /* # line numbers */
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
180 #define AUXENT union external_auxent
183 /********************** RELOCATION DIRECTIVES **********************/
185 struct external_reloc
193 #define RELOC struct external_reloc
This page took 0.033448 seconds and 4 git commands to generate.