1 /* coff information for Sparc.
3 Copyright (C) 2001-2017 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 /* This file is an amalgamation of several standard include files that
21 define coff format, such as filehdr.h, aouthdr.h, and so forth. In
22 addition, all datatypes have been translated into character arrays of
23 (presumed) equivalent size. This is necessary so that this file can
24 be used with different systems while still yielding the same results. */
27 #define DO_NOT_DEFINE_SYMENT
28 #define DO_NOT_DEFINE_AUXENT
29 #include "coff/external.h"
31 #define F_RELFLG (0x0001) /* relocation info stripped */
32 #define F_EXEC (0x0002) /* file is executable */
33 #define F_LNNO (0x0004) /* line numbers stripped */
34 #define F_LSYMS (0x0008) /* local symbols stripped */
36 #define SPARCMAGIC (0540)
38 /* This is Lynx's all-platform magic number for executables. */
40 #define LYNXCOFFMAGIC (0415)
42 #define OMAGIC 0404 /* object files, eg as output */
43 #define ZMAGIC 0413 /* demand load format, eg normal ld output */
44 #define STMAGIC 0401 /* target shlib */
45 #define SHMAGIC 0443 /* host shlib */
47 /* More names of "special" sections. */
53 /********************** SYMBOLS **********************/
55 #define E_SYMNMLEN (8) /* # characters in a symbol name */
56 #define E_FILNMLEN (14) /* # characters in a file name */
57 #define E_DIMNUM (4) /* # array dimensions in auxiliary entry */
59 struct external_syment
62 char e_name
[E_SYMNMLEN
];
67 #if 0 /* of doubtful value */
70 char e_leading_zero
[1];
85 #define N_BTMASK (0xf)
86 #define N_TMASK (0x30)
93 char x_tagndx
[4]; /* str, un, or enum tag indx */
96 char x_lnno
[2]; /* declaration line number */
97 char x_size
[2]; /* str/union/array size */
99 char x_fsize
[4]; /* size of function */
102 struct { /* if ISFCN, tag, or .bb */
103 char x_lnnoptr
[4]; /* ptr to fcn line # */
104 char x_endndx
[4]; /* entry ndx past block end */
106 struct { /* if ISARY, up to 4 dimen. */
107 char x_dimen
[E_DIMNUM
][2];
110 char x_tvndx
[2]; /* tv index */
114 char x_fname
[E_FILNMLEN
];
122 char x_scnlen
[4]; /* section length */
123 char x_nreloc
[2]; /* # relocation entries */
124 char x_nlinno
[2]; /* # line numbers */
128 char x_tvfill
[4]; /* tv fill value */
129 char x_tvlen
[2]; /* length of .tv */
130 char x_tvran
[2][2]; /* tv range */
131 } x_tv
; /* .tv section info (in auxent of sym .tv)) */
133 char x_fill
[20]; /* forces to 20-byte size */
136 #define SYMENT struct external_syment
138 #define AUXENT union external_auxent
141 #define COFF_ADJUST_SYM_OUT_POST(ABFD, INP, EXTP) \
144 SYMENT *extsym = (SYMENT *) (EXTP); \
145 extsym->padding[0] = 0; \
146 extsym->padding[1] = 0; \
149 #define _ETEXT "etext"
151 /********************** RELOCATION DIRECTIVES **********************/
153 struct external_reloc
162 #define RELOC struct external_reloc