aboutsummaryrefslogtreecommitdiff
path: root/include/coff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1993-08-03 20:24:54 +0000
committerIan Lance Taylor <ian@airs.com>1993-08-03 20:24:54 +0000
commit045f6b66d30e8de28321c51a02358e871cfcc0ea (patch)
treee5631c7ec83ac20e115d80ea9822d713240925da /include/coff
parentdae31cf51ba2425ba562de00011f49c16e25951a (diff)
downloadgdb-045f6b66d30e8de28321c51a02358e871cfcc0ea.zip
gdb-045f6b66d30e8de28321c51a02358e871cfcc0ea.tar.gz
gdb-045f6b66d30e8de28321c51a02358e871cfcc0ea.tar.bz2
* ecoff.h: New file.
* alpha.h, mips.h: Moved common information into ecoff.h. Moved external structure definitions in from ecoff-ext.h. * ecoff-ext.h: Removed; information now in alpha.h and mips.h.
Diffstat (limited to 'include/coff')
-rw-r--r--include/coff/.Sanitize2
-rw-r--r--include/coff/ChangeLog11
-rw-r--r--include/coff/alpha.h297
-rw-r--r--include/coff/ecoff-ext.h363
4 files changed, 309 insertions, 364 deletions
diff --git a/include/coff/.Sanitize b/include/coff/.Sanitize
index b3293bc..6e45d65 100644
--- a/include/coff/.Sanitize
+++ b/include/coff/.Sanitize
@@ -27,7 +27,7 @@ Things-to-keep:
ChangeLog
alpha.h
a29k.h
-ecoff-ext.h
+ecoff.h
h8300.h
h8500.h
i386.h
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog
index 7fe050e..fdc3f5a 100644
--- a/include/coff/ChangeLog
+++ b/include/coff/ChangeLog
@@ -1,3 +1,14 @@
+Tue Aug 3 11:17:53 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * ecoff.h: New file.
+ * alpha.h, mips.h: Moved common information into ecoff.h. Moved
+ external structure definitions in from ecoff-ext.h.
+ * ecoff-ext.h: Removed; information now in alpha.h and mips.h.
+
+Sun Jul 18 21:43:59 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
+
+ * i386.h: Recognize I386PTXMAGIC.
+
Fri Jul 16 09:54:35 1993 Ian Lance Taylor (ian@cygnus.com)
* mips.h (MIPS_AOUT_{OZ}MAGIC): Renamed from {OZ}MAGIC.
diff --git a/include/coff/alpha.h b/include/coff/alpha.h
new file mode 100644
index 0000000..f39cd98
--- /dev/null
+++ b/include/coff/alpha.h
@@ -0,0 +1,297 @@
+/* ECOFF support on Alpha machines.
+ coff/ecoff.h must be included before this file. */
+
+/********************** FILE HEADER **********************/
+
+struct external_filehdr {
+ unsigned char f_magic[2]; /* magic number */
+ unsigned char f_nscns[2]; /* number of sections */
+ unsigned char f_timdat[4]; /* time & date stamp */
+ unsigned char f_symptr[8]; /* file pointer to symtab */
+ unsigned char f_nsyms[4]; /* number of symtab entries */
+ unsigned char f_opthdr[2]; /* sizeof(optional hdr) */
+ unsigned char f_flags[2]; /* flags */
+};
+
+/* Magic numbers are defined in coff/ecoff.h. */
+#define ALPHA_ECOFF_BADMAG(x) ((x).f_magic!=ALPHA_MAGIC)
+
+#define FILHDR struct external_filehdr
+#define FILHSZ sizeof(FILHDR)
+
+/********************** AOUT "OPTIONAL HEADER" **********************/
+
+
+typedef struct external_aouthdr
+{
+ unsigned char magic[2]; /* type of file */
+ unsigned char vstamp[2]; /* version stamp */
+ unsigned char tsize[8]; /* text size in bytes, padded to FW bdry*/
+ unsigned char dsize[8]; /* initialized data " " */
+ unsigned char bsize[8]; /* uninitialized data " " */
+ unsigned char entry[8]; /* entry pt. */
+ unsigned char text_start[8]; /* base of text used for this file */
+ unsigned char data_start[8]; /* base of data used for this file */
+ unsigned char bss_start[8]; /* base of bss used for this file */
+ unsigned char gprmask[4]; /* ?? */
+ unsigned char cprmask[4][8]; /* ?? */
+ unsigned char gp_value[4]; /* value for gp register */
+} AOUTHDR;
+
+/* compute size of a header */
+
+#define AOUTSZ (sizeof(AOUTHDR))
+
+/********************** SECTION HEADER **********************/
+
+struct external_scnhdr {
+ unsigned char s_name[8]; /* section name */
+ unsigned char s_paddr[8]; /* physical address, aliased s_nlib */
+ unsigned char s_vaddr[8]; /* virtual address */
+ unsigned char s_size[8]; /* section size */
+ unsigned char s_scnptr[8]; /* file ptr to raw data for section */
+ unsigned char s_relptr[8]; /* file ptr to relocation */
+ unsigned char s_lnnoptr[8]; /* file ptr to line numbers */
+ unsigned char s_nreloc[2]; /* number of relocation entries */
+ unsigned char s_nlnno[2]; /* number of line number entries*/
+ unsigned char s_flags[4]; /* flags */
+};
+
+#define SCNHDR struct external_scnhdr
+#define SCNHSZ sizeof(SCNHDR)
+
+/********************** RELOCATION DIRECTIVES **********************/
+
+struct external_reloc {
+ unsigned char r_vaddr[8];
+ unsigned char r_bits[4];
+};
+
+#define RELOC struct external_reloc
+#define RELSZ 8
+
+/* MIPS ECOFF uses a packed 8 byte format for relocs. These constants
+ are used to unpack the r_bits field. */
+
+#define RELOC_BITS0_SYMNDX_SH_LEFT_BIG 16
+#define RELOC_BITS0_SYMNDX_SH_LEFT_LITTLE 0
+
+#define RELOC_BITS1_SYMNDX_SH_LEFT_BIG 8
+#define RELOC_BITS1_SYMNDX_SH_LEFT_LITTLE 8
+
+#define RELOC_BITS2_SYMNDX_SH_LEFT_BIG 0
+#define RELOC_BITS2_SYMNDX_SH_LEFT_LITTLE 16
+
+#define RELOC_BITS3_TYPE_BIG 0x1E
+#define RELOC_BITS3_TYPE_SH_BIG 1
+#define RELOC_BITS3_TYPE_LITTLE 0x78
+#define RELOC_BITS3_TYPE_SH_LITTLE 3
+
+#define RELOC_BITS3_EXTERN_BIG 0x01
+#define RELOC_BITS3_EXTERN_LITTLE 0x80
+
+#define DEFAULT_DATA_SECTION_ALIGNMENT 16
+#define DEFAULT_BSS_SECTION_ALIGNMENT 16
+#define DEFAULT_TEXT_SECTION_ALIGNMENT 16
+/* For new sections we havn't heard of before */
+#define DEFAULT_SECTION_ALIGNMENT 16
+
+/********************** SYMBOLIC INFORMATION **********************/
+
+/* Written by John Gilmore. */
+
+/* ECOFF uses COFF-like section structures, but its own symbol format.
+ This file defines the symbol format in fields whose size and alignment
+ will not vary on different host systems. */
+
+/* File header as a set of bytes */
+
+struct hdr_ext {
+ unsigned char h_magic[2];
+ unsigned char h_vstamp[2];
+ unsigned char h_ilineMax[4];
+ unsigned char h_cbLine[4];
+ unsigned char h_cbLineOffset[4];
+ unsigned char h_idnMax[4];
+ unsigned char h_cbDnOffset[4];
+ unsigned char h_ipdMax[4];
+ unsigned char h_cbPdOffset[4];
+ unsigned char h_isymMax[4];
+ unsigned char h_cbSymOffset[4];
+ unsigned char h_ioptMax[4];
+ unsigned char h_cbOptOffset[4];
+ unsigned char h_iauxMax[4];
+ unsigned char h_cbAuxOffset[4];
+ unsigned char h_issMax[4];
+ unsigned char h_cbSsOffset[4];
+ unsigned char h_issExtMax[4];
+ unsigned char h_cbSsExtOffset[4];
+ unsigned char h_ifdMax[4];
+ unsigned char h_cbFdOffset[4];
+ unsigned char h_crfd[4];
+ unsigned char h_cbRfdOffset[4];
+ unsigned char h_iextMax[4];
+ unsigned char h_cbExtOffset[4];
+};
+
+/* File descriptor external record */
+
+struct fdr_ext {
+ unsigned char f_adr[4];
+ unsigned char f_rss[4];
+ unsigned char f_issBase[4];
+ unsigned char f_cbSs[4];
+ unsigned char f_isymBase[4];
+ unsigned char f_csym[4];
+ unsigned char f_ilineBase[4];
+ unsigned char f_cline[4];
+ unsigned char f_ioptBase[4];
+ unsigned char f_copt[4];
+ unsigned char f_ipdFirst[2];
+ unsigned char f_cpd[2];
+ unsigned char f_iauxBase[4];
+ unsigned char f_caux[4];
+ unsigned char f_rfdBase[4];
+ unsigned char f_crfd[4];
+ unsigned char f_bits1[1];
+ unsigned char f_bits2[3];
+ unsigned char f_cbLineOffset[4];
+ unsigned char f_cbLine[4];
+};
+
+#define FDR_BITS1_LANG_BIG 0xF8
+#define FDR_BITS1_LANG_SH_BIG 3
+#define FDR_BITS1_LANG_LITTLE 0x1F
+#define FDR_BITS1_LANG_SH_LITTLE 0
+
+#define FDR_BITS1_FMERGE_BIG 0x04
+#define FDR_BITS1_FMERGE_LITTLE 0x20
+
+#define FDR_BITS1_FREADIN_BIG 0x02
+#define FDR_BITS1_FREADIN_LITTLE 0x40
+
+#define FDR_BITS1_FBIGENDIAN_BIG 0x01
+#define FDR_BITS1_FBIGENDIAN_LITTLE 0x80
+
+#define FDR_BITS2_GLEVEL_BIG 0xC0
+#define FDR_BITS2_GLEVEL_SH_BIG 6
+#define FDR_BITS2_GLEVEL_LITTLE 0x03
+#define FDR_BITS2_GLEVEL_SH_LITTLE 0
+
+/* We ignore the `reserved' field in bits2. */
+
+/* Procedure descriptor external record */
+
+struct pdr_ext {
+ unsigned char p_adr[4];
+ unsigned char p_isym[4];
+ unsigned char p_iline[4];
+ unsigned char p_regmask[4];
+ unsigned char p_regoffset[4];
+ unsigned char p_iopt[4];
+ unsigned char p_fregmask[4];
+ unsigned char p_fregoffset[4];
+ unsigned char p_frameoffset[4];
+ unsigned char p_framereg[2];
+ unsigned char p_pcreg[2];
+ unsigned char p_lnLow[4];
+ unsigned char p_lnHigh[4];
+ unsigned char p_cbLineOffset[4];
+};
+
+/* Line numbers */
+
+struct line_ext {
+ unsigned char l_line[4];
+};
+
+/* Symbol external record */
+
+struct sym_ext {
+ unsigned char s_iss[4];
+ unsigned char s_value[4];
+ unsigned char s_bits1[1];
+ unsigned char s_bits2[1];
+ unsigned char s_bits3[1];
+ unsigned char s_bits4[1];
+};
+
+#define SYM_BITS1_ST_BIG 0xFC
+#define SYM_BITS1_ST_SH_BIG 2
+#define SYM_BITS1_ST_LITTLE 0x3F
+#define SYM_BITS1_ST_SH_LITTLE 0
+
+#define SYM_BITS1_SC_BIG 0x03
+#define SYM_BITS1_SC_SH_LEFT_BIG 3
+#define SYM_BITS1_SC_LITTLE 0xC0
+#define SYM_BITS1_SC_SH_LITTLE 6
+
+#define SYM_BITS2_SC_BIG 0xE0
+#define SYM_BITS2_SC_SH_BIG 5
+#define SYM_BITS2_SC_LITTLE 0x07
+#define SYM_BITS2_SC_SH_LEFT_LITTLE 2
+
+#define SYM_BITS2_RESERVED_BIG 0x10
+#define SYM_BITS2_RESERVED_LITTLE 0x08
+
+#define SYM_BITS2_INDEX_BIG 0x0F
+#define SYM_BITS2_INDEX_SH_LEFT_BIG 16
+#define SYM_BITS2_INDEX_LITTLE 0xF0
+#define SYM_BITS2_INDEX_SH_LITTLE 4
+
+#define SYM_BITS3_INDEX_SH_LEFT_BIG 8
+#define SYM_BITS3_INDEX_SH_LEFT_LITTLE 4
+
+#define SYM_BITS4_INDEX_SH_LEFT_BIG 0
+#define SYM_BITS4_INDEX_SH_LEFT_LITTLE 12
+
+/* External symbol external record */
+
+struct ext_ext {
+ unsigned char es_bits1[1];
+ unsigned char es_bits2[1];
+ unsigned char es_ifd[2];
+ struct sym_ext es_asym;
+};
+
+#define EXT_BITS1_JMPTBL_BIG 0x80
+#define EXT_BITS1_JMPTBL_LITTLE 0x01
+
+#define EXT_BITS1_COBOL_MAIN_BIG 0x40
+#define EXT_BITS1_COBOL_MAIN_LITTLE 0x02
+
+#define EXT_BITS1_WEAKEXT_BIG 0x20
+#define EXT_BITS1_WEAKEXT_LITTLE 0x04
+
+/* Dense numbers external record */
+
+struct dnr_ext {
+ unsigned char d_rfd[4];
+ unsigned char d_index[4];
+};
+
+/* Relative file descriptor */
+
+struct rfd_ext {
+ unsigned char rfd[4];
+};
+
+/* Optimizer symbol external record */
+
+struct opt_ext {
+ unsigned char o_bits1[1];
+ unsigned char o_bits2[1];
+ unsigned char o_bits3[1];
+ unsigned char o_bits4[1];
+ struct rndx_ext o_rndx;
+ unsigned char o_offset[4];
+};
+
+#define OPT_BITS2_VALUE_SH_LEFT_BIG 16
+#define OPT_BITS2_VALUE_SH_LEFT_LITTLE 0
+
+#define OPT_BITS3_VALUE_SH_LEFT_BIG 8
+#define OPT_BITS3_VALUE_SH_LEFT_LITTLE 8
+
+#define OPT_BITS4_VALUE_SH_LEFT_BIG 0
+#define OPT_BITS4_VALUE_SH_LEFT_LITTLE 16
diff --git a/include/coff/ecoff-ext.h b/include/coff/ecoff-ext.h
deleted file mode 100644
index c7e3f91..0000000
--- a/include/coff/ecoff-ext.h
+++ /dev/null
@@ -1,363 +0,0 @@
-/* MIPS `ECOFF' symbol table external format.
- Copyright 1992, 1993 Free Software Foundation.
- Contributed by Cygnus Support. Written by John Gilmore.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-/* ECOFF uses COFF-like section structures, but its own symbol format.
- This file defines the symbol format in fields whose size and alignment
- will not vary on different host systems. The bfd module coff-msym.c
- converts between external and internal forms of this information,
- deals with byte order issues, etc. */
-
-/* File header as a set of bytes */
-
-struct hdr_ext {
- unsigned char h_magic[2];
- unsigned char h_vstamp[2];
- unsigned char h_ilineMax[4];
- unsigned char h_cbLine[4];
- unsigned char h_cbLineOffset[4];
- unsigned char h_idnMax[4];
- unsigned char h_cbDnOffset[4];
- unsigned char h_ipdMax[4];
- unsigned char h_cbPdOffset[4];
- unsigned char h_isymMax[4];
- unsigned char h_cbSymOffset[4];
- unsigned char h_ioptMax[4];
- unsigned char h_cbOptOffset[4];
- unsigned char h_iauxMax[4];
- unsigned char h_cbAuxOffset[4];
- unsigned char h_issMax[4];
- unsigned char h_cbSsOffset[4];
- unsigned char h_issExtMax[4];
- unsigned char h_cbSsExtOffset[4];
- unsigned char h_ifdMax[4];
- unsigned char h_cbFdOffset[4];
- unsigned char h_crfd[4];
- unsigned char h_cbRfdOffset[4];
- unsigned char h_iextMax[4];
- unsigned char h_cbExtOffset[4];
-};
-
-/* File descriptor external record */
-
-struct fdr_ext {
- unsigned char f_adr[4];
- unsigned char f_rss[4];
- unsigned char f_issBase[4];
- unsigned char f_cbSs[4];
- unsigned char f_isymBase[4];
- unsigned char f_csym[4];
- unsigned char f_ilineBase[4];
- unsigned char f_cline[4];
- unsigned char f_ioptBase[4];
- unsigned char f_copt[4];
- unsigned char f_ipdFirst[2];
- unsigned char f_cpd[2];
- unsigned char f_iauxBase[4];
- unsigned char f_caux[4];
- unsigned char f_rfdBase[4];
- unsigned char f_crfd[4];
- unsigned char f_bits1[1];
- unsigned char f_bits2[3];
- unsigned char f_cbLineOffset[4];
- unsigned char f_cbLine[4];
-};
-
-#define FDR_BITS1_LANG_BIG 0xF8
-#define FDR_BITS1_LANG_SH_BIG 3
-#define FDR_BITS1_LANG_LITTLE 0x1F
-#define FDR_BITS1_LANG_SH_LITTLE 0
-
-#define FDR_BITS1_FMERGE_BIG 0x04
-#define FDR_BITS1_FMERGE_LITTLE 0x20
-
-#define FDR_BITS1_FREADIN_BIG 0x02
-#define FDR_BITS1_FREADIN_LITTLE 0x40
-
-#define FDR_BITS1_FBIGENDIAN_BIG 0x01
-#define FDR_BITS1_FBIGENDIAN_LITTLE 0x80
-
-#define FDR_BITS2_GLEVEL_BIG 0xC0
-#define FDR_BITS2_GLEVEL_SH_BIG 6
-#define FDR_BITS2_GLEVEL_LITTLE 0x03
-#define FDR_BITS2_GLEVEL_SH_LITTLE 0
-
-/* We ignore the `reserved' field in bits2. */
-
-
-/* Procedure descriptor external record */
-
-struct pdr_ext {
- unsigned char p_adr[4];
- unsigned char p_isym[4];
- unsigned char p_iline[4];
- unsigned char p_regmask[4];
- unsigned char p_regoffset[4];
- unsigned char p_iopt[4];
- unsigned char p_fregmask[4];
- unsigned char p_fregoffset[4];
- unsigned char p_frameoffset[4];
- unsigned char p_framereg[2];
- unsigned char p_pcreg[2];
- unsigned char p_lnLow[4];
- unsigned char p_lnHigh[4];
- unsigned char p_cbLineOffset[4];
-};
-
-/* Line numbers */
-
-struct line_ext {
- unsigned char l_line[4];
-};
-
-/* Symbol external record */
-
-struct sym_ext {
- unsigned char s_iss[4];
- unsigned char s_value[4];
- unsigned char s_bits1[1];
- unsigned char s_bits2[1];
- unsigned char s_bits3[1];
- unsigned char s_bits4[1];
-};
-
-#define SYM_BITS1_ST_BIG 0xFC
-#define SYM_BITS1_ST_SH_BIG 2
-#define SYM_BITS1_ST_LITTLE 0x3F
-#define SYM_BITS1_ST_SH_LITTLE 0
-
-#define SYM_BITS1_SC_BIG 0x03
-#define SYM_BITS1_SC_SH_LEFT_BIG 3
-#define SYM_BITS1_SC_LITTLE 0xC0
-#define SYM_BITS1_SC_SH_LITTLE 6
-
-#define SYM_BITS2_SC_BIG 0xE0
-#define SYM_BITS2_SC_SH_BIG 5
-#define SYM_BITS2_SC_LITTLE 0x07
-#define SYM_BITS2_SC_SH_LEFT_LITTLE 2
-
-#define SYM_BITS2_RESERVED_BIG 0x10
-#define SYM_BITS2_RESERVED_LITTLE 0x08
-
-#define SYM_BITS2_INDEX_BIG 0x0F
-#define SYM_BITS2_INDEX_SH_LEFT_BIG 16
-#define SYM_BITS2_INDEX_LITTLE 0xF0
-#define SYM_BITS2_INDEX_SH_LITTLE 4
-
-#define SYM_BITS3_INDEX_SH_LEFT_BIG 8
-#define SYM_BITS3_INDEX_SH_LEFT_LITTLE 4
-
-#define SYM_BITS4_INDEX_SH_LEFT_BIG 0
-#define SYM_BITS4_INDEX_SH_LEFT_LITTLE 12
-
-/* External symbol external record */
-
-struct ext_ext {
- unsigned char es_bits1[1];
- unsigned char es_bits2[1];
- unsigned char es_ifd[2];
- struct sym_ext es_asym;
-};
-
-#define EXT_BITS1_JMPTBL_BIG 0x80
-#define EXT_BITS1_JMPTBL_LITTLE 0x01
-
-#define EXT_BITS1_COBOL_MAIN_BIG 0x40
-#define EXT_BITS1_COBOL_MAIN_LITTLE 0x02
-
-#define EXT_BITS1_WEAKEXT_BIG 0x20
-#define EXT_BITS1_WEAKEXT_LITTLE 0x04
-
-/* Type information external record */
-
-struct tir_ext {
- unsigned char t_bits1[1];
- unsigned char t_tq45[1];
- unsigned char t_tq01[1];
- unsigned char t_tq23[1];
-};
-
-#define TIR_BITS1_FBITFIELD_BIG 0x80
-#define TIR_BITS1_FBITFIELD_LITTLE 0x01
-
-#define TIR_BITS1_CONTINUED_BIG 0x40
-#define TIR_BITS1_CONTINUED_LITTLE 0x02
-
-#define TIR_BITS1_BT_BIG 0x3F
-#define TIR_BITS1_BT_SH_BIG 0
-#define TIR_BITS1_BT_LITTLE 0xFC
-#define TIR_BITS1_BT_SH_LITTLE 2
-
-#define TIR_BITS_TQ4_BIG 0xF0
-#define TIR_BITS_TQ4_SH_BIG 4
-#define TIR_BITS_TQ5_BIG 0x0F
-#define TIR_BITS_TQ5_SH_BIG 0
-#define TIR_BITS_TQ4_LITTLE 0x0F
-#define TIR_BITS_TQ4_SH_LITTLE 0
-#define TIR_BITS_TQ5_LITTLE 0xF0
-#define TIR_BITS_TQ5_SH_LITTLE 4
-
-#define TIR_BITS_TQ0_BIG 0xF0
-#define TIR_BITS_TQ0_SH_BIG 4
-#define TIR_BITS_TQ1_BIG 0x0F
-#define TIR_BITS_TQ1_SH_BIG 0
-#define TIR_BITS_TQ0_LITTLE 0x0F
-#define TIR_BITS_TQ0_SH_LITTLE 0
-#define TIR_BITS_TQ1_LITTLE 0xF0
-#define TIR_BITS_TQ1_SH_LITTLE 4
-
-#define TIR_BITS_TQ2_BIG 0xF0
-#define TIR_BITS_TQ2_SH_BIG 4
-#define TIR_BITS_TQ3_BIG 0x0F
-#define TIR_BITS_TQ3_SH_BIG 0
-#define TIR_BITS_TQ2_LITTLE 0x0F
-#define TIR_BITS_TQ2_SH_LITTLE 0
-#define TIR_BITS_TQ3_LITTLE 0xF0
-#define TIR_BITS_TQ3_SH_LITTLE 4
-
-
-/* Relative symbol external record */
-
-struct rndx_ext {
- unsigned char r_bits[4];
-};
-
-#define RNDX_BITS0_RFD_SH_LEFT_BIG 4
-#define RNDX_BITS1_RFD_BIG 0xF0
-#define RNDX_BITS1_RFD_SH_BIG 4
-
-#define RNDX_BITS0_RFD_SH_LEFT_LITTLE 0
-#define RNDX_BITS1_RFD_LITTLE 0x0F
-#define RNDX_BITS1_RFD_SH_LEFT_LITTLE 8
-
-#define RNDX_BITS1_INDEX_BIG 0x0F
-#define RNDX_BITS1_INDEX_SH_LEFT_BIG 16
-#define RNDX_BITS2_INDEX_SH_LEFT_BIG 8
-#define RNDX_BITS3_INDEX_SH_LEFT_BIG 0
-
-#define RNDX_BITS1_INDEX_LITTLE 0xF0
-#define RNDX_BITS1_INDEX_SH_LITTLE 4
-#define RNDX_BITS2_INDEX_SH_LEFT_LITTLE 4
-#define RNDX_BITS3_INDEX_SH_LEFT_LITTLE 12
-
-
-/* Dense numbers external record */
-
-struct dnr_ext {
- unsigned char d_rfd[4];
- unsigned char d_index[4];
-};
-
-/* Auxliliary symbol information external record */
-
-union aux_ext {
- struct tir_ext a_ti;
- struct rndx_ext a_rndx;
- unsigned char a_dnLow[4];
- unsigned char a_dnHigh[4];
- unsigned char a_isym[4];
- unsigned char a_iss[4];
- unsigned char a_width[4];
- unsigned char a_count[4];
-};
-
-/* FIXME! These are copied from ../bfd/libbfd.h */
-extern bfd_vma _do_getb32 PARAMS ((unsigned char *addr));
-extern bfd_vma _do_getl32 PARAMS ((unsigned char *addr));
-extern void _do_putb32 PARAMS ((bfd_vma data, unsigned char *addr));
-extern void _do_putl32 PARAMS ((bfd_vma data, unsigned char *addr));
-
-#define AUX_GET_ANY(bigend, ax, field) \
- ((bigend) ? _do_getb32 ((ax)->field) : _do_getl32 ((ax)->field))
-
-#define AUX_GET_DNLOW(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_dnLow)
-#define AUX_GET_DNHIGH(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_dnHigh)
-#define AUX_GET_ISYM(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_isym)
-#define AUX_GET_ISS(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_iss)
-#define AUX_GET_WIDTH(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_width)
-#define AUX_GET_COUNT(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_count)
-
-#define AUX_PUT_ANY(bigend, val, ax, field) \
- ((bigend) \
- ? (_do_putb32 ((val), (ax)->field), 0) \
- : (_do_putl32 ((val), (ax)->field), 0))
-
-#define AUX_PUT_DNLOW(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_dnLow)
-#define AUX_PUT_DNHIGH(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_dnHigh)
-#define AUX_PUT_ISYM(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_isym)
-#define AUX_PUT_ISS(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_iss)
-#define AUX_PUT_WIDTH(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_width)
-#define AUX_PUT_COUNT(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_count)
-
-/* Relative file descriptor */
-
-struct rfd_ext {
- unsigned char rfd[4];
-};
-
-/* Optimizer symbol external record */
-
-struct opt_ext {
- unsigned char o_bits1[1];
- unsigned char o_bits2[1];
- unsigned char o_bits3[1];
- unsigned char o_bits4[1];
- struct rndx_ext o_rndx;
- unsigned char o_offset[4];
-};
-
-#define OPT_BITS2_VALUE_SH_LEFT_BIG 16
-#define OPT_BITS2_VALUE_SH_LEFT_LITTLE 0
-
-#define OPT_BITS3_VALUE_SH_LEFT_BIG 8
-#define OPT_BITS3_VALUE_SH_LEFT_LITTLE 8
-
-#define OPT_BITS4_VALUE_SH_LEFT_BIG 0
-#define OPT_BITS4_VALUE_SH_LEFT_LITTLE 16
-
-/* Prototypes for the swapping functions. These require that sym.h be
- included before this file. */
-extern void ecoff_swap_hdr_in PARAMS ((bfd *, struct hdr_ext *, HDRR *));
-extern void ecoff_swap_hdr_out PARAMS ((bfd *, HDRR *, struct hdr_ext *));
-extern void ecoff_swap_fdr_in PARAMS ((bfd *, struct fdr_ext *, FDR *));
-extern void ecoff_swap_fdr_out PARAMS ((bfd *, FDR *, struct fdr_ext *));
-extern void ecoff_swap_pdr_in PARAMS ((bfd *, struct pdr_ext *, PDR *));
-extern void ecoff_swap_pdr_out PARAMS ((bfd *, PDR *, struct pdr_ext *));
-extern void ecoff_swap_sym_in PARAMS ((bfd *, struct sym_ext *, SYMR *));
-extern void ecoff_swap_sym_out PARAMS ((bfd *, SYMR *, struct sym_ext *));
-extern void ecoff_swap_ext_in PARAMS ((bfd *, struct ext_ext *, EXTR *));
-extern void ecoff_swap_ext_out PARAMS ((bfd *, EXTR *, struct ext_ext *));
-extern void ecoff_swap_dnr_in PARAMS ((bfd *, struct dnr_ext *, DNR *));
-extern void ecoff_swap_dnr_out PARAMS ((bfd *, DNR *, struct dnr_ext *));
-extern void ecoff_swap_tir_in PARAMS ((int bigend, struct tir_ext *, TIR *));
-extern void ecoff_swap_tir_out PARAMS ((int bigend, TIR *, struct tir_ext *));
-extern void ecoff_swap_rndx_in PARAMS ((int bigend, struct rndx_ext *,
- RNDXR *));
-extern void ecoff_swap_rndx_out PARAMS ((int bigend, RNDXR *,
- struct rndx_ext *));
-extern void ecoff_swap_rfd_in PARAMS ((bfd *, struct rfd_ext *, RFDT *));
-extern void ecoff_swap_rfd_out PARAMS ((bfd *, RFDT *, struct rfd_ext *));
-extern void ecoff_swap_opt_in PARAMS ((bfd *, struct opt_ext *, OPTR *));
-extern void ecoff_swap_opt_out PARAMS ((bfd *, OPTR *, struct opt_ext *));