OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /or1k/tags/start/gdb-5.0/include/coff
    from Rev 1765 to Rev 579
    Reverse comparison

Rev 1765 → Rev 579

/i386.h File deleted
/rs6000.h File deleted
/mipspe.h File deleted
/h8300.h File deleted
/h8500.h File deleted
/mcore.h File deleted
/a29k.h File deleted
/sym.h File deleted
/sh.h File deleted
/or1k.h File deleted
or1k.h Property changes : Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Index: symconst.h =================================================================== --- symconst.h (revision 1765) +++ symconst.h (nonexistent) @@ -1,177 +0,0 @@ -/* Declarations of constants for internal format of MIPS ECOFF symbols. - Originally contributed by MIPS Computer Systems and Third Eye Software. - Changes contributed by Cygnus Support are in the public domain. - - This file is just aggregated with the files that make up the GNU - release; it is not considered part of GAS, GDB, or other GNU - programs. */ - -/* - * |-----------------------------------------------------------| - * | Copyright (c) 1992, 1991, 1990 MIPS Computer Systems, Inc.| - * | MIPS Computer Systems, Inc. grants reproduction and use | - * | rights to all parties, PROVIDED that this comment is | - * | maintained in the copy. | - * |-----------------------------------------------------------| - */ - -/* (C) Copyright 1984 by Third Eye Software, Inc. - * - * Third Eye Software, Inc. grants reproduction and use rights to - * all parties, PROVIDED that this comment is maintained in the copy. - * - * Third Eye makes no claims about the applicability of this - * symbol table to a particular use. - */ - -/* glevels for field in FDR */ -#define GLEVEL_0 2 -#define GLEVEL_1 1 -#define GLEVEL_2 0 /* for upward compat reasons. */ -#define GLEVEL_3 3 - -/* magic number fo symheader */ -#define magicSym 0x7009 -/* The Alpha uses this value instead, for some reason. */ -#define magicSym2 0x1992 - -/* Language codes */ -#define langC 0 -#define langPascal 1 -#define langFortran 2 -#define langAssembler 3 /* one Assembley inst might map to many mach */ -#define langMachine 4 -#define langNil 5 -#define langAda 6 -#define langPl1 7 -#define langCobol 8 -#define langStdc 9 /* FIXME: Collides with SGI langCplusplus */ -#define langCplusplus 9 /* FIXME: Collides with langStdc */ -#define langCplusplusV2 10 /* SGI addition */ -#define langMax 11 /* maximun allowed 32 -- 5 bits */ - -/* The following are value definitions for the fields in the SYMR */ - -/* - * Storage Classes - */ - -#define scNil 0 -#define scText 1 /* text symbol */ -#define scData 2 /* initialized data symbol */ -#define scBss 3 /* un-initialized data symbol */ -#define scRegister 4 /* value of symbol is register number */ -#define scAbs 5 /* value of symbol is absolute */ -#define scUndefined 6 /* who knows? */ -#define scCdbLocal 7 /* variable's value is IN se->va.?? */ -#define scBits 8 /* this is a bit field */ -#define scCdbSystem 9 /* variable's value is IN CDB's address space */ -#define scDbx 9 /* overlap dbx internal use */ -#define scRegImage 10 /* register value saved on stack */ -#define scInfo 11 /* symbol contains debugger information */ -#define scUserStruct 12 /* address in struct user for current process */ -#define scSData 13 /* load time only small data */ -#define scSBss 14 /* load time only small common */ -#define scRData 15 /* load time only read only data */ -#define scVar 16 /* Var parameter (fortran,pascal) */ -#define scCommon 17 /* common variable */ -#define scSCommon 18 /* small common */ -#define scVarRegister 19 /* Var parameter in a register */ -#define scVariant 20 /* Variant record */ -#define scSUndefined 21 /* small undefined(external) data */ -#define scInit 22 /* .init section symbol */ -#define scBasedVar 23 /* Fortran or PL/1 ptr based var */ -#define scXData 24 /* exception handling data */ -#define scPData 25 /* Procedure section */ -#define scFini 26 /* .fini section */ -#define scRConst 27 /* .rconst section */ -#define scMax 32 - - -/* - * Symbol Types - */ - -#define stNil 0 /* Nuthin' special */ -#define stGlobal 1 /* external symbol */ -#define stStatic 2 /* static */ -#define stParam 3 /* procedure argument */ -#define stLocal 4 /* local variable */ -#define stLabel 5 /* label */ -#define stProc 6 /* " " Procedure */ -#define stBlock 7 /* beginnning of block */ -#define stEnd 8 /* end (of anything) */ -#define stMember 9 /* member (of anything - struct/union/enum */ -#define stTypedef 10 /* type definition */ -#define stFile 11 /* file name */ -#define stRegReloc 12 /* register relocation */ -#define stForward 13 /* forwarding address */ -#define stStaticProc 14 /* load time only static procs */ -#define stConstant 15 /* const */ -#define stStaParam 16 /* Fortran static parameters */ - /* These new symbol types have been recently added to SGI machines. */ -#define stStruct 26 /* Beginning of block defining a struct type */ -#define stUnion 27 /* Beginning of block defining a union type */ -#define stEnum 28 /* Beginning of block defining an enum type */ -#define stIndirect 34 /* Indirect type specification */ - /* Pseudo-symbols - internal to debugger */ -#define stStr 60 /* string */ -#define stNumber 61 /* pure number (ie. 4 NOR 2+2) */ -#define stExpr 62 /* 2+2 vs. 4 */ -#define stType 63 /* post-coersion SER */ -#define stMax 64 - -/* definitions for fields in TIR */ - -/* type qualifiers for ti.tq0 -> ti.(itqMax-1) */ -#define tqNil 0 /* bt is what you see */ -#define tqPtr 1 /* pointer */ -#define tqProc 2 /* procedure */ -#define tqArray 3 /* duh */ -#define tqFar 4 /* longer addressing - 8086/8 land */ -#define tqVol 5 /* volatile */ -#define tqConst 6 /* const */ -#define tqMax 8 - -/* basic types as seen in ti.bt */ -#define btNil 0 /* undefined (also, enum members) */ -#define btAdr 1 /* address - integer same size as pointer */ -#define btChar 2 /* character */ -#define btUChar 3 /* unsigned character */ -#define btShort 4 /* short */ -#define btUShort 5 /* unsigned short */ -#define btInt 6 /* int */ -#define btUInt 7 /* unsigned int */ -#define btLong 8 /* long */ -#define btULong 9 /* unsigned long */ -#define btFloat 10 /* float (real) */ -#define btDouble 11 /* Double (real) */ -#define btStruct 12 /* Structure (Record) */ -#define btUnion 13 /* Union (variant) */ -#define btEnum 14 /* Enumerated */ -#define btTypedef 15 /* defined via a typedef, isymRef points */ -#define btRange 16 /* subrange of int */ -#define btSet 17 /* pascal sets */ -#define btComplex 18 /* fortran complex */ -#define btDComplex 19 /* fortran double complex */ -#define btIndirect 20 /* forward or unnamed typedef */ -#define btFixedDec 21 /* Fixed Decimal */ -#define btFloatDec 22 /* Float Decimal */ -#define btString 23 /* Varying Length Character String */ -#define btBit 24 /* Aligned Bit String */ -#define btPicture 25 /* Picture */ -#define btVoid 26 /* void */ -#define btLongLong 27 /* long long */ -#define btULongLong 28 /* unsigned long long */ -#define btMax 64 - -#if (_MFG == _MIPS) -/* optimization type codes */ -#define otNil 0 -#define otReg 1 /* move var to reg */ -#define otBlock 2 /* begin basic block */ -#define otProc 3 /* procedure */ -#define otInline 4 /* inline procedure */ -#define otEnd 5 /* whatever you started */ -#define otMax 6 /* KEEP UP TO DATE */ -#endif /* (_MFG == _MIPS) */ Index: powerpc.h =================================================================== --- powerpc.h (revision 1765) +++ powerpc.h (nonexistent) @@ -1,199 +0,0 @@ -/* Basic coff information for the PowerPC - * - * Based on coff/rs6000.h, coff/i386.h and others. - * - * Initial release: Kim Knuttila (krk@cygnus.com) - */ - -/********************** FILE HEADER **********************/ - -struct external_filehdr { - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ -}; - -#define FILHDR struct external_filehdr -#define FILHSZ 20 - -/* Bits for f_flags: - * F_RELFLG relocation info stripped from file - * F_EXEC file is executable (no unresolved external references) - * F_LNNO line numbers stripped from file - * F_LSYMS local symbols stripped from file - * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax) - */ - -#define F_RELFLG (0x0001) -#define F_EXEC (0x0002) -#define F_LNNO (0x0004) -#define F_LSYMS (0x0008) - -/* extra NT defines */ -#define PPCMAGIC 0760 /* peeked on aa PowerPC Windows NT box */ -#define DOSMAGIC 0x5a4d /* from arm.h, i386.h */ -#define NT_SIGNATURE 0x00004550 /* from arm.h, i386.h */ - -/* from winnt.h */ -#define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b - -#define PPCBADMAG(x) ((x).f_magic != PPCMAGIC) - -/********************** AOUT "OPTIONAL HEADER" **********************/ - -typedef struct -{ - char magic[2]; /* type of file */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ -} -AOUTHDR; - -#define AOUTSZ 28 -#define AOUTHDRSZ 28 - -/********************** SECTION HEADER **********************/ - -struct external_scnhdr { - char s_name[8]; /* section name */ - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[2]; /* number of relocation entries */ - char s_nlnno[2]; /* number of line number entries */ - char s_flags[4]; /* flags */ -}; - -#define SCNHDR struct external_scnhdr -#define SCNHSZ 40 - -/* - * names of "special" sections - */ -#define _TEXT ".text" -#define _DATA ".data" -#define _BSS ".bss" -#define _COMMENT ".comment" -#define _LIB ".lib" - -/********************** LINE NUMBERS **********************/ - -/* 1 line number entry for every "breakpointable" source line in a section. - * Line numbers are grouped on a per function basis; first entry in a function - * grouping will have l_lnno = 0 and in place of physical address will be the - * symbol table index of the function name. - */ -struct external_lineno { - union { - char l_symndx[4]; /* function name symbol index, iff l_lnno == 0 */ - char l_paddr[4]; /* (physical) address of line number */ - } l_addr; - char l_lnno[2]; /* line number */ -}; - -#define LINENO struct external_lineno -#define LINESZ 6 - -/********************** SYMBOLS **********************/ - -#define E_SYMNMLEN 8 /* # characters in a symbol name */ - -/* Allow the file name length to be overridden in the including file */ -#ifndef E_FILNMLEN -#define E_FILNMLEN 14 -#endif - -#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ - -struct external_syment -{ - union { - char e_name[E_SYMNMLEN]; - struct { - char e_zeroes[4]; - char e_offset[4]; - } e; - } e; - char e_value[4]; - char e_scnum[2]; - char e_type[2]; - char e_sclass[1]; - char e_numaux[1]; -}; - -#define SYMENT struct external_syment -#define SYMESZ 18 - -#define N_BTMASK (0xf) -#define N_TMASK (0x30) -#define N_BTSHFT (4) -#define N_TSHIFT (2) - -union external_auxent { - struct { - char x_tagndx[4]; /* str, un, or enum tag indx */ - union { - struct { - char x_lnno[2]; /* declaration line number */ - char x_size[2]; /* str/union/array size */ - } x_lnsz; - char x_fsize[4]; /* size of function */ - } x_misc; - union { - struct { /* if ISFCN, tag, or .bb */ - char x_lnnoptr[4]; /* ptr to fcn line # */ - char x_endndx[4]; /* entry ndx past block end */ - } x_fcn; - struct { /* if ISARY, up to 4 dimen. */ - char x_dimen[E_DIMNUM][2]; - } x_ary; - } x_fcnary; - char x_tvndx[2]; /* tv index */ - } x_sym; - - union { - char x_fname[E_FILNMLEN]; - struct { - char x_zeroes[4]; - char x_offset[4]; - } x_n; - } x_file; - - struct { - char x_scnlen[4]; /* section length */ - char x_nreloc[2]; /* # relocation entries */ - char x_nlinno[2]; /* # line numbers */ - char x_checksum[4]; /* section COMDAT checksum */ - char x_associated[2]; /* COMDAT associated section index */ - char x_comdat[1]; /* COMDAT selection number */ - } x_scn; -}; - -#define AUXENT union external_auxent -#define AUXESZ 18 - -#define _ETEXT "etext" - -/********************** RELOCATION DIRECTIVES **********************/ - -struct external_reloc { - char r_vaddr[4]; - char r_symndx[4]; - char r_type[2]; -}; - -#define RELOC struct external_reloc -#define RELSZ 10 - Index: arm.h =================================================================== --- arm.h (revision 1765) +++ arm.h (nonexistent) @@ -1,303 +0,0 @@ -/* ARM COFF support for BFD. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. - - This file is part of BFD, the Binary File Descriptor library. - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#define COFFARM 1 - -/********************** FILE HEADER **********************/ - -struct external_filehdr -{ - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ -}; - -/* Bits for f_flags: - * F_RELFLG relocation info stripped from file - * F_EXEC file is executable (no unresolved external references) - * F_LNNO line numbers stripped from file - * F_LSYMS local symbols stripped from file - * F_INTERWORK file supports switching between ARM and Thumb instruction sets - * F_INTERWORK_SET the F_INTERWORK bit is valid - * F_APCS_FLOAT code passes float arguments in float registers - * F_PIC code is reentrant/position-independent - * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax) - * F_APCS_26 file uses 26 bit ARM Procedure Calling Standard - * F_APCS_SET the F_APCS_26, F_APCS_FLOAT and F_PIC bits have been initialised - * F_SOFT_FLOAT code does not use floating point instructions - */ - -#define F_RELFLG (0x0001) -#define F_EXEC (0x0002) -#define F_LNNO (0x0004) -#define F_LSYMS (0x0008) -#define F_INTERWORK (0x0010) -#define F_INTERWORK_SET (0x0020) -#define F_APCS_FLOAT (0x0040) -#undef F_AR16WR -#define F_PIC (0x0080) -#define F_AR32WR (0x0100) -#define F_APCS_26 (0x0400) -#define F_APCS_SET (0x0800) -#define F_SOFT_FLOAT (0x2000) - -/* Bits stored in flags field of the internal_f structure */ - -#define F_INTERWORK (0x0010) -#define F_APCS_FLOAT (0x0040) -#define F_PIC (0x0080) -#define F_APCS26 (0x1000) -#define F_ARM_ARCHITECTURE_MASK (0x4000+0x0800+0x0400) -#define F_ARM_2 (0x0400) -#define F_ARM_2a (0x0800) -#define F_ARM_3 (0x0c00) -#define F_ARM_3M (0x4000) -#define F_ARM_4 (0x4400) -#define F_ARM_4T (0x4800) -#define F_ARM_5 (0x4c00) - -/* - * ARMMAGIC ought to encoded the procesor type, - * but it is too late to change it now, instead - * the flags field of the internal_f structure - * is used as shown above. - * - * XXX - NC 5/6/97 - */ - -#define ARMMAGIC 0xa00 /* I just made this up */ - -#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC)) - -#define ARMPEMAGIC 0x1c0 -#define THUMBPEMAGIC 0x1c2 - -#undef ARMBADMAG -#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC) && ((x).f_magic != ARMPEMAGIC) && ((x).f_magic != THUMBPEMAGIC)) - -#define FILHDR struct external_filehdr -#define FILHSZ 20 - - -/********************** AOUT "OPTIONAL HEADER" **********************/ - - -typedef struct -{ - char magic[2]; /* type of file */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ -} -AOUTHDR; - - -#define AOUTSZ 28 -#define AOUTHDRSZ 28 - -#define OMAGIC 0404 /* object files, eg as output */ -#define ZMAGIC 0413 /* demand load format, eg normal ld output */ -#define STMAGIC 0401 /* target shlib */ -#define SHMAGIC 0443 /* host shlib */ - - -/* define some NT default values */ -/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */ -#define NT_SECTION_ALIGNMENT 0x1000 -#define NT_FILE_ALIGNMENT 0x200 -#define NT_DEF_RESERVE 0x100000 -#define NT_DEF_COMMIT 0x1000 - -/********************** SECTION HEADER **********************/ -struct external_scnhdr -{ - char s_name[8]; /* section name */ - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[2]; /* number of relocation entries */ - char s_nlnno[2]; /* number of line number entries*/ - char s_flags[4]; /* flags */ -}; - -#define SCNHDR struct external_scnhdr -#define SCNHSZ 40 - -/* - * names of "special" sections - */ -#define _TEXT ".text" -#define _DATA ".data" -#define _BSS ".bss" -#define _COMMENT ".comment" -#define _LIB ".lib" - -/* We use the .rdata section to hold read only data. */ -#define _LIT ".rdata" - -/********************** LINE NUMBERS **********************/ - -/* 1 line number entry for every "breakpointable" source line in a section. - * Line numbers are grouped on a per function basis; first entry in a function - * grouping will have l_lnno = 0 and in place of physical address will be the - * symbol table index of the function name. - */ -struct external_lineno -{ - union - { - char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ - char l_paddr[4]; /* (physical) address of line number */ - } l_addr; - char l_lnno[2]; /* line number */ -}; - - -#define LINENO struct external_lineno -#define LINESZ 6 - - -/********************** SYMBOLS **********************/ - -#define E_SYMNMLEN 8 /* # characters in a symbol name */ -#define E_FILNMLEN 14 /* # characters in a file name */ -#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ - -struct external_syment -{ - union - { - char e_name[E_SYMNMLEN]; - struct - { - char e_zeroes[4]; - char e_offset[4]; - } e; - } e; - char e_value[4]; - char e_scnum[2]; - char e_type[2]; - char e_sclass[1]; - char e_numaux[1]; -}; - -#define N_BTMASK (0xf) -#define N_TMASK (0x30) -#define N_BTSHFT (4) -#define N_TSHIFT (2) - -union external_auxent -{ - struct - { - char x_tagndx[4]; /* str, un, or enum tag indx */ - union - { - struct - { - char x_lnno[2]; /* declaration line number */ - char x_size[2]; /* str/union/array size */ - } x_lnsz; - char x_fsize[4]; /* size of function */ - } x_misc; - union - { - struct /* if ISFCN, tag, or .bb */ - { - char x_lnnoptr[4]; /* ptr to fcn line # */ - char x_endndx[4]; /* entry ndx past block end */ - } x_fcn; - struct /* if ISARY, up to 4 dimen. */ - { - char x_dimen[E_DIMNUM][2]; - } x_ary; - } x_fcnary; - char x_tvndx[2]; /* tv index */ - } x_sym; - - union - { - char x_fname[E_FILNMLEN]; - struct - { - char x_zeroes[4]; - char x_offset[4]; - } x_n; - } x_file; - - struct - { - char x_scnlen[4]; /* section length */ - char x_nreloc[2]; /* # relocation entries */ - char x_nlinno[2]; /* # line numbers */ - char x_checksum[4]; /* section COMDAT checksum */ - char x_associated[2]; /* COMDAT associated section index */ - char x_comdat[1]; /* COMDAT selection number */ - } x_scn; - - struct - { - char x_tvfill[4]; /* tv fill value */ - char x_tvlen[2]; /* length of .tv */ - char x_tvran[2][2]; /* tv range */ - } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ -}; - -#define SYMENT struct external_syment -#define SYMESZ 18 -#define AUXENT union external_auxent -#define AUXESZ 18 - -#define _ETEXT "etext" - -/********************** RELOCATION DIRECTIVES **********************/ -#ifdef ARM_WINCE -struct external_reloc -{ - char r_vaddr[4]; - char r_symndx[4]; - char r_type[2]; -}; - -#define RELOC struct external_reloc -#define RELSZ 10 - -#else -struct external_reloc -{ - char r_vaddr[4]; - char r_symndx[4]; - char r_type[2]; - char r_offset[4]; -}; - -#define RELOC struct external_reloc -#define RELSZ 14 -#endif Index: tic54x.h =================================================================== --- tic54x.h (revision 1765) +++ tic54x.h (nonexistent) @@ -1,14 +0,0 @@ -/* TI COFF information for Texas Instruments TMS320C54X. This file customizes - the settings in coff/ti.h. */ -#ifndef COFF_TIC54X_H -#define COFF_TIC54X_H -#define TIC54X_TARGET_ID 0x98 -#define TIC54XALGMAGIC 0x009B /* c54x algebraic assembler output */ -#define TIC5X_TARGET_ID 0x92 -#define TI_TARGET_ID TIC54X_TARGET_ID -#define OCTETS_PER_BYTE_POWER 1 /* octets per byte, as a power of two */ -#define HOWTO_BANK 6 /* add to howto to get absolute/sect-relative version */ -#define TICOFF_TARGET_ARCH bfd_arch_tic54x -#define TICOFF_DEFAULT_MAGIC TICOFF1MAGIC /* we use COFF1 for compatibility */ -#include "coff/ti.h" -#endif /* COFF_TIC54X_H */ Index: alpha.h =================================================================== --- alpha.h (revision 1765) +++ alpha.h (nonexistent) @@ -1,362 +0,0 @@ -/* 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 && (x).f_magic != ALPHA_MAGIC_BSD) - -/* The object type is encoded in the f_flags. */ -#define F_ALPHA_OBJECT_TYPE_MASK 0x3000 -#define F_ALPHA_NO_SHARED 0x1000 -#define F_ALPHA_SHARABLE 0x2000 -#define F_ALPHA_CALL_SHARED 0x3000 - -#define FILHDR struct external_filehdr -#define FILHSZ 24 - -/********************** AOUT "OPTIONAL HEADER" **********************/ - - -typedef struct external_aouthdr -{ - unsigned char magic[2]; /* type of file */ - unsigned char vstamp[2]; /* version stamp */ - unsigned char bldrev[2]; /* ?? */ - unsigned char padding[2]; /* pad to quadword boundary */ - unsigned char tsize[8]; /* text size in bytes */ - 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]; /* bitmask of general registers used */ - unsigned char fprmask[4]; /* bitmask of floating point registers used */ - unsigned char gp_value[8]; /* value for gp register */ -} AOUTHDR; - -/* compute size of a header */ - -#define AOUTSZ 80 -#define AOUTHDRSZ 80 - -/********************** 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 64 - -/********************** RELOCATION DIRECTIVES **********************/ - -struct external_reloc { - unsigned char r_vaddr[8]; - unsigned char r_symndx[4]; - unsigned char r_bits[4]; -}; - -#define RELOC struct external_reloc -#define RELSZ 16 - -/* Constants to unpack the r_bits field. The Alpha seems to always be - little endian, so I haven't bothered to define big endian variants - of these. */ - -#define RELOC_BITS0_TYPE_LITTLE 0xff -#define RELOC_BITS0_TYPE_SH_LITTLE 0 - -#define RELOC_BITS1_EXTERN_LITTLE 0x01 - -#define RELOC_BITS1_OFFSET_LITTLE 0x7e -#define RELOC_BITS1_OFFSET_SH_LITTLE 1 - -#define RELOC_BITS1_RESERVED_LITTLE 0x80 -#define RELOC_BITS1_RESERVED_SH_LITTLE 7 -#define RELOC_BITS2_RESERVED_LITTLE 0xff -#define RELOC_BITS2_RESERVED_SH_LEFT_LITTLE 1 -#define RELOC_BITS3_RESERVED_LITTLE 0x03 -#define RELOC_BITS3_RESERVED_SH_LEFT_LITTLE 9 - -#define RELOC_BITS3_SIZE_LITTLE 0xfc -#define RELOC_BITS3_SIZE_SH_LITTLE 2 - -/* The r_type field in a reloc is one of the following values. */ -#define ALPHA_R_IGNORE 0 -#define ALPHA_R_REFLONG 1 -#define ALPHA_R_REFQUAD 2 -#define ALPHA_R_GPREL32 3 -#define ALPHA_R_LITERAL 4 -#define ALPHA_R_LITUSE 5 -#define ALPHA_R_GPDISP 6 -#define ALPHA_R_BRADDR 7 -#define ALPHA_R_HINT 8 -#define ALPHA_R_SREL16 9 -#define ALPHA_R_SREL32 10 -#define ALPHA_R_SREL64 11 -#define ALPHA_R_OP_PUSH 12 -#define ALPHA_R_OP_STORE 13 -#define ALPHA_R_OP_PSUB 14 -#define ALPHA_R_OP_PRSHIFT 15 -#define ALPHA_R_GPVALUE 16 -#define ALPHA_R_GPRELHIGH 17 -#define ALPHA_R_GPRELLOW 18 -#define ALPHA_R_IMMED 19 - -/* Overloaded reloc value used by Net- and OpenBSD. */ -#define ALPHA_R_LITERALSLEAZY 17 - -/* With ALPHA_R_LITUSE, the r_size field is one of the following values. */ -#define ALPHA_R_LU_BASE 1 -#define ALPHA_R_LU_BYTOFF 2 -#define ALPHA_R_LU_JSR 3 - -/* With ALPHA_R_IMMED, the r_size field is one of the following values. */ -#define ALPHA_R_IMMED_GP_16 1 -#define ALPHA_R_IMMED_GP_HI32 2 -#define ALPHA_R_IMMED_SCN_HI32 3 -#define ALPHA_R_IMMED_BR_HI32 4 -#define ALPHA_R_IMMED_LO32 5 - -/********************** 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_idnMax[4]; - unsigned char h_ipdMax[4]; - unsigned char h_isymMax[4]; - unsigned char h_ioptMax[4]; - unsigned char h_iauxMax[4]; - unsigned char h_issMax[4]; - unsigned char h_issExtMax[4]; - unsigned char h_ifdMax[4]; - unsigned char h_crfd[4]; - unsigned char h_iextMax[4]; - unsigned char h_cbLine[8]; - unsigned char h_cbLineOffset[8]; - unsigned char h_cbDnOffset[8]; - unsigned char h_cbPdOffset[8]; - unsigned char h_cbSymOffset[8]; - unsigned char h_cbOptOffset[8]; - unsigned char h_cbAuxOffset[8]; - unsigned char h_cbSsOffset[8]; - unsigned char h_cbSsExtOffset[8]; - unsigned char h_cbFdOffset[8]; - unsigned char h_cbRfdOffset[8]; - unsigned char h_cbExtOffset[8]; -}; - -/* File descriptor external record */ - -struct fdr_ext { - unsigned char f_adr[8]; - unsigned char f_cbLineOffset[8]; - unsigned char f_cbLine[8]; - unsigned char f_cbSs[8]; - unsigned char f_rss[4]; - unsigned char f_issBase[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[4]; - unsigned char f_cpd[4]; - 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_padding[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[8]; - unsigned char p_cbLineOffset[8]; - 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_lnLow[4]; - unsigned char p_lnHigh[4]; - unsigned char p_gp_prologue[1]; - unsigned char p_bits1[1]; - unsigned char p_bits2[1]; - unsigned char p_localoff[1]; - unsigned char p_framereg[2]; - unsigned char p_pcreg[2]; -}; - -#define PDR_BITS1_GP_USED_BIG 0x80 -#define PDR_BITS1_REG_FRAME_BIG 0x40 -#define PDR_BITS1_PROF_BIG 0x20 -#define PDR_BITS1_RESERVED_BIG 0x1f -#define PDR_BITS1_RESERVED_SH_LEFT_BIG 8 -#define PDR_BITS2_RESERVED_BIG 0xff -#define PDR_BITS2_RESERVED_SH_BIG 0 - -#define PDR_BITS1_GP_USED_LITTLE 0x01 -#define PDR_BITS1_REG_FRAME_LITTLE 0x02 -#define PDR_BITS1_PROF_LITTLE 0x04 -#define PDR_BITS1_RESERVED_LITTLE 0xf8 -#define PDR_BITS1_RESERVED_SH_LITTLE 3 -#define PDR_BITS2_RESERVED_LITTLE 0xff -#define PDR_BITS2_RESERVED_SH_LEFT_LITTLE 5 - -/* Line numbers */ - -struct line_ext { - unsigned char l_line[4]; -}; - -/* Symbol external record */ - -struct sym_ext { - unsigned char s_value[8]; - unsigned char s_iss[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 { - struct sym_ext es_asym; - unsigned char es_bits1[1]; - unsigned char es_bits2[3]; - unsigned char es_ifd[4]; -}; - -#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 Index: apollo.h =================================================================== --- apollo.h (revision 1765) +++ apollo.h (nonexistent) @@ -1,252 +0,0 @@ -/*** coff information for Apollo M68K */ - -/********************** FILE HEADER **********************/ - -struct external_filehdr { - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ -}; - - -/* Motorola 68000/68008/68010/68020 */ -#define MC68MAGIC 0520 -#define MC68KWRMAGIC 0520 /* writeable text segments */ -#define MC68TVMAGIC 0521 -#define MC68KROMAGIC 0521 /* readonly shareable text segments */ -#define MC68KPGMAGIC 0522 /* demand paged text segments */ -#define M68MAGIC 0210 -#define M68TVMAGIC 0211 - -/* Apollo 68000-based machines have a different magic number. This comes - * from /usr/include/apollo/filehdr.h - */ -#define APOLLOM68KMAGIC 0627 - -#define OMAGIC M68MAGIC -#define M68KBADMAG(x) (((x).f_magic!=MC68MAGIC) && ((x).f_magic!=MC68KWRMAGIC) && ((x).f_magic!=MC68TVMAGIC) && \ - ((x).f_magic!=MC68KROMAGIC) && ((x).f_magic!=MC68KPGMAGIC) && ((x).f_magic!=M68MAGIC) && ((x).f_magic!=M68TVMAGIC) && \ - ((x).f_magic!=APOLLOM68KMAGIC) ) - - -#define FILHDR struct external_filehdr -#define FILHSZ 20 - - -/********************** AOUT "OPTIONAL HEADER" **********************/ - -typedef struct -{ - char magic[2]; /* type of file */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ - char o_sri[4]; /* Apollo specific - .sri data pointer */ - char o_inlib[4]; /* Apollo specific - .inlib data pointer */ - char vid[8]; /* Apollo specific - 64 bit version ID */ -} -AOUTHDR; - -#define APOLLO_COFF_VERSION_NUMBER 1 /* the value of the aouthdr magic */ -#define AOUTHDRSZ 44 -#define AOUTSZ 44 - - - -/********************** SECTION HEADER **********************/ - -struct external_scnhdr { - /* Apollo allow for larger section names by allowing it to be in - * the string table. - */ - char s_name[8]; - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[2]; /* number of relocation entries */ - char s_nlnno[2]; /* number of line number entries*/ - char s_flags[4]; /* flags */ -}; - -/* If s_zeores is all zeroes, s_offset gives the real location of the name - * in the string table. - */ - -#define s_zeroes section_name.s_name -#define s_offset (section_name.s_name+4) - -/* - * names of "special" sections - */ -#define _TEXT ".text" -#define _DATA ".data" -#define _BSS ".bss" -#define _TV ".tv" -#define _INIT ".init" -#define _FINI ".fini" -#define _LINES ".lines" -#define _BLOCKS ".blocks" -#define _SRI ".sri" /* Static Resource Information (systype, - et al.) */ -#define _MIR ".mir" /* Module Information Records */ -#define _APTV ".aptv" /* Apollo-style transfer vectors. */ -#define _INLIB ".inlib" /* Shared Library information */ -#define _RWDI ".rwdi" /* Read/write data initialization directives for - compressed sections */ -#define _UNWIND ".unwind" /* Stack unwind information */ - -#define SCNHDR struct external_scnhdr -#define SCNHSZ 40 - - -/********************** LINE NUMBERS **********************/ - -/* 1 line number entry for every "breakpointable" source line in a section. - * Line numbers are grouped on a per function basis; first entry in a function - * grouping will have l_lnno = 0 and in place of physical address will be the - * symbol table index of the function name. - */ -struct external_lineno { - union { - char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ - char l_paddr[4]; /* (physical) address of line number */ - } l_addr; - char l_lnno[2]; /* line number */ -}; - - -#define LINENO struct external_lineno -#define LINESZ 6 - - -/********************** SYMBOLS **********************/ - -#define E_SYMNMLEN 8 /* # characters in a symbol name */ -#define E_FILNMLEN 14 /* # characters in a file name */ -#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ - -struct external_syment -{ - union { - char e_name[E_SYMNMLEN]; - struct { - char e_zeroes[4]; - char e_offset[4]; - } e; - } e; - char e_value[4]; - char e_scnum[2]; - char e_type[2]; - char e_sclass[1]; - char e_numaux[1]; -}; - - - -#define N_BTMASK (017) -#define N_TMASK (060) -#define N_BTSHFT (4) -#define N_TSHIFT (2) - - -union external_auxent { - struct { - char x_tagndx[4]; /* str, un, or enum tag indx */ - union { - struct { - char x_lnno[2]; /* declaration line number */ - char x_size[2]; /* str/union/array size */ - } x_lnsz; - char x_fsize[4]; /* size of function */ - } x_misc; - union { - struct { /* if ISFCN, tag, or .bb */ - char x_lnnoptr[4]; /* ptr to fcn line # */ - char x_endndx[4]; /* entry ndx past block end */ - } x_fcn; - struct { /* if ISARY, up to 4 dimen. */ - char x_dimen[E_DIMNUM][2]; - } x_ary; - } x_fcnary; - char x_tvndx[2]; /* tv index */ - } x_sym; - - union { - char x_fname[E_FILNMLEN]; - struct { - char x_zeroes[4]; - char x_offset[4]; - } x_n; - } x_file; - - struct { - char x_scnlen[4]; /* section length */ - char x_nreloc[2]; /* # relocation entries */ - char x_nlinno[2]; /* # line numbers */ - } x_scn; - - struct { - char x_tvfill[4]; /* tv fill value */ - char x_tvlen[2]; /* length of .tv */ - char x_tvran[2][2]; /* tv range */ - } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ - - -}; - -#define SYMENT struct external_syment -#define SYMESZ 18 -#define AUXENT union external_auxent -#define AUXESZ 18 - - - -/********************** RELOCATION DIRECTIVES **********************/ - - -struct external_reloc { - char r_vaddr[4]; - char r_symndx[4]; - char r_type[2]; -#ifdef M68K_COFF_OFFSET - char r_offset[4]; -#endif - -}; - - -#define RELOC struct external_reloc - -#ifdef M68K_COFF_OFFSET -#define RELSZ 14 -#else -#define RELSZ 10 -#endif - -/* Apollo specific STYP flags */ - -#define STYP_RELOCATED_NOT_LOADED 0x00010000 /* Section is relocated normally during linking, but need - not be loaded during program execution */ -#define STYP_DEBUG 0x00020000 /* debug section */ -#define STYP_OVERLAY 0x00040000 /* Section is overlayed */ -#define STYP_INSTRUCTION 0x00200000 /* Section contains executable code */ - -#define STYP_ZERO 0x00800000 /* Section is initialized to zero */ -#define STYP_INSTALLED 0x02000000 /* Section should be installable in KGT */ -#define STYP_LOOK_INSTALLED 0x04000000 /* Look for section in KGT */ -#define STYP_SECALIGN1 0x08000000 /* Specially aligned section */ -#define STYP_SECALIGN2 0x10000000 /* " " " */ -#define STYP_COMPRESSED 0x20000000 /* No section data per se (s_scnptr = 0), but there are - initialization directives for it in .rwdi section - (used in conjunction with STYP_BSS) */ Index: or16.h =================================================================== --- or16.h (revision 1765) +++ or16.h (nonexistent) @@ -1,249 +0,0 @@ -/* COFF specification for OpenRISC 1000. - Copyright (C) 1993-2000 Free Software Foundation, Inc. - Contributed by David Wood @ New York University. - Modified by Johan Rydberg, - -This file is part of BFD, the Binary File Descriptor library. - -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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifndef OR16 -# define OR16 -#endif - -/* File Header and related definitions: */ -struct external_filehdr { - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ -}; - -#define FILHDR struct external_filehdr -#define FILHSZ 20 - -/* Magic numbers for OpenRISC 16. As it is know we use the - numbers for Am29000. - - (AT&T will assign the "real" magic number) */ -#define SIPFBOMAGIC 0572 /* Am29000 (Byte 0 is MSB) */ -#define SIPRBOMAGIC 0573 /* Am29000 (Byte 0 is LSB) */ - -#define OR16_MAGIC_BIG SIPFBOMAGIC -#define OR16_MAGIC_LITTLE SIPRBOMAGIC -#define OR16BADMAG(x) (((x).f_magic!=OR16_MAGIC_BIG) && \ - ((x).f_magic!=OR16_MAGIC_LITTLE)) - -#define OMAGIC OR16_MAGIC_BIG - -/* Optional (a.out) header: */ -typedef struct external_aouthdr { - char magic[2]; /* type of file */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ -} AOUTHDR; - -#define AOUTSZ 28 -#define AOUTHDRSZ 28 - -/* aouthdr magic numbers */ -#define NMAGIC 0410 /* separate i/d executable */ -#define SHMAGIC 0406 /* NYU/Ultra3 shared data executable - (writable text) */ - -#define _ETEXT "_etext" - - -/* Section header and related definitions: */ -struct external_scnhdr { - char s_name[8]; /* section name */ - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[2]; /* number of relocation entries */ - char s_nlnno[2]; /* number of line number entries */ - char s_flags[4]; /* flags */ -}; - -#define SCNHDR struct external_scnhdr -#define SCNHSZ 40 - -/* Names of "special" sections: */ -#define _TEXT ".text" -#define _DATA ".data" -#define _BSS ".bss" -#define _LIT ".lit" - -/* Section types - with additional section type for global - registers which will be relocatable for the OpenRISC 1000. - - In instances where it is necessary for a linker to produce an - output file which contains text or data not based at virtual - address 0, e.g. for a ROM, then the linker should accept - address base information as command input and use PAD sections - to skip over unused addresses. */ -#define STYP_BSSREG 0x1200 /* Global register area (like STYP_INFO) */ -#define STYP_ENVIR 0x2200 /* Environment (like STYP_INFO) */ -#define STYP_ABS 0x4000 /* Absolute (allocated, not reloc, loaded) */ - -/* Relocation information declaration and related definitions: */ -struct external_reloc { - char r_vaddr[4]; /* (virtual) address of reference */ - char r_symndx[4]; /* index into symbol table */ - char r_type[2]; /* relocation type */ -}; - -#define RELOC struct external_reloc -#define RELSZ 10 /* sizeof (RELOC) */ - -/* OR16 relocation types. Not all of these are actually used. */ -#define R_OR16_NONE 0 -#define R_OR16_ABS 1 /* reference is absolute */ -#define R_OR16_INSN_REL 2 /* insn relative (jmp/call) */ -#define R_OR16_INSN_ABS 3 /* insn absolute (jmp/call) */ -#define R_OR16_INSN_LO 4 /* insn low half (16-bit) */ -#define R_OR16_INSN_HI 5 /* insn hi half (16-bit) */ -#define R_OR16_INSN_IHI 10 /* insn hi half (part 2) */ -#define R_OR16_8 6 /* relocatable byte value */ -#define R_OR16_16 7 /* relocatable halfword value */ -#define R_OR16_32 8 /* relocatable word value */ -#define R_OR16_JMP 9 /* XXX special */ - -#define R_OR16_INSN_REL_12 11 /* 12-bit insn relative */ -#define R_OR16_INSN_REL_26 12 /* 26-bit insn relative */ - -/* -NOTE: -All the "I" forms refer to 29000 instruction formats. The linker is -expected to know how the numeric information is split and/or aligned -within the instruction word(s). R_BYTE works for instructions, too. - -If the parameter to a CONSTH instruction is a relocatable type, two -relocation records are written. The first has an r_type of R_IHIHALF -(33 octal) and a normal r_vaddr and r_symndx. The second relocation -record has an r_type of R_IHCONST (34 octal), a normal r_vaddr (which -is redundant), and an r_symndx containing the 32-bit constant offset -to the relocation instead of the actual symbol table index. This -second record is always written, even if the constant offset is zero. -The constant fields of the instruction are set to zero. -*/ - -/* Line number entry declaration and related definitions: */ -struct external_lineno { - union { - char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ - char l_paddr[4]; /* (physical) address of line number */ - } l_addr; - char l_lnno[2]; /* line number */ -}; - -#define LINENO struct external_lineno -#define LINESZ 6 /* sizeof (LINENO) */ - -/* Symbol entry declaration and related definitions: */ -#define E_SYMNMLEN 8 /* Number of characters in a symbol name */ - -struct external_syment -{ - union { - char e_name[E_SYMNMLEN]; - struct { - char e_zeroes[4]; - char e_offset[4]; - } e; - } e; - char e_value[4]; - char e_scnum[2]; - char e_type[2]; - char e_sclass[1]; - char e_numaux[1]; -}; - -#define SYMENT struct external_syment -#define SYMESZ 18 - -/* Storage class definitions - new classes for global registers: */ -#define C_GLBLREG 19 /* global register */ -#define C_EXTREG 20 /* external global register */ -#define C_DEFREG 21 /* ext. def. of global register */ - -/* Derived symbol mask/shifts: */ -#define N_BTMASK (0xf) -#define N_BTSHFT (4) -#define N_TMASK (0x30) -#define N_TSHIFT (2) - -/* Auxiliary symbol table entry declaration and related - definitions. */ -#define E_FILNMLEN 14 /* # characters in a file name */ -#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ - -union external_auxent { - struct { - char x_tagndx[4]; /* str, un, or enum tag indx */ - union { - struct { - char x_lnno[2]; /* declaration line number */ - char x_size[2]; /* str/union/array size */ - } x_lnsz; - char x_fsize[4]; /* size of function */ - } x_misc; - union { - struct { /* if ISFCN, tag, or .bb */ - char x_lnnoptr[4]; /* ptr to fcn line # */ - char x_endndx[4]; /* entry ndx past block end */ - } x_fcn; - struct { /* if ISARY, up to 4 dimen. */ - char x_dimen[E_DIMNUM][2]; - } x_ary; - } x_fcnary; - char x_tvndx[2]; /* tv index */ - } x_sym; - - union { - char x_fname[E_FILNMLEN]; - struct { - char x_zeroes[4]; - char x_offset[4]; - } x_n; - } x_file; - - struct { - char x_scnlen[4]; /* section length */ - char x_nreloc[2]; /* # relocation entries */ - char x_nlinno[2]; /* # line numbers */ - } x_scn; - - struct { - char x_tvfill[4]; /* tv fill value */ - char x_tvlen[2]; /* length of .tv */ - char x_tvran[2][2]; /* tv range */ - } x_tv; /* info about .tv section - (in auxent of symbol .tv)) */ -}; - -#define AUXENT union external_auxent -#define AUXESZ 18
or16.h Property changes : Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Index: tic80.h =================================================================== --- tic80.h (revision 1765) +++ tic80.h (nonexistent) @@ -1,228 +0,0 @@ -/*** coff information for TI TMS320C80 (MVP) */ - -/********************** FILE HEADER **********************/ - -struct external_filehdr { - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ - char f_target_id[2]; /* target id (TIc80 specific) */ -}; - -#define TIC80_ARCH_MAGIC 0x0C1 /* Goes in the file header magic number field */ -#define TIC80_TARGET_ID 0x95 /* Goes in the target id field */ - -#define TIC80BADMAG(x) ((x).f_magic != TIC80_ARCH_MAGIC) - -#define FILHDR struct external_filehdr -#define FILHSZ 22 - - -/********************** AOUT "OPTIONAL HEADER" **********************/ - - -typedef struct -{ - char magic[2]; /* type of file */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ -} -AOUTHDR; - -#define TIC80_AOUTHDR_MAGIC 0x108 /* Goes in the optional file header magic number field */ - -#define AOUTHDRSZ 28 -#define AOUTSZ 28 - - - - -/********************** SECTION HEADER **********************/ - - -struct external_scnhdr { - char s_name[8]; /* section name */ - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[2]; /* number of relocation entries */ - char s_nlnno[2]; /* number of line number entries*/ - char s_flags[2]; /* flags */ - char s_reserved[1]; /* reserved (TIc80 specific) */ - char s_mempage[1]; /* memory page number (TIc80) */ -}; - -/* - * names of "special" sections - */ -#define _TEXT ".text" -#define _DATA ".data" -#define _BSS ".bss" -#define _CINIT ".cinit" -#define _CONST ".const" -#define _SWITCH ".switch" -#define _STACK ".stack" -#define _SYSMEM ".sysmem" - - -#define SCNHDR struct external_scnhdr -#define SCNHSZ 40 - - -/********************** LINE NUMBERS **********************/ - -/* 1 line number entry for every "breakpointable" source line in a section. - * Line numbers are grouped on a per function basis; first entry in a function - * grouping will have l_lnno = 0 and in place of physical address will be the - * symbol table index of the function name. - */ -struct external_lineno { - union { - char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ - char l_paddr[4]; /* (physical) address of line number */ - } l_addr; - char l_lnno[2]; /* line number */ -}; - -#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) (ext->l_lnno)); -#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16(abfd,val, (bfd_byte *) (ext->l_lnno)); - -#define LINENO struct external_lineno -#define LINESZ 6 - - -/********************** SYMBOLS **********************/ - -#define E_SYMNMLEN 8 /* # characters in a symbol name */ -#define E_FILNMLEN 14 /* # characters in a file name */ -#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ - -struct external_syment -{ - union { - char e_name[E_SYMNMLEN]; - struct { - char e_zeroes[4]; - char e_offset[4]; - } e; - } e; - char e_value[4]; - char e_scnum[2]; - char e_type[2]; - char e_sclass[1]; - char e_numaux[1]; -}; - - - -#define N_BTMASK (017) -#define N_TMASK (060) -#define N_BTSHFT (4) -#define N_TSHIFT (2) - -/* FIXME - need to correlate with TIc80 Code Generation Tools User's Guide, CG:A-25 */ -union external_auxent { - struct { - char x_tagndx[4]; /* str, un, or enum tag indx */ - union { - struct { - char x_lnno[2]; /* declaration line number */ - char x_size[2]; /* str/union/array size */ - } x_lnsz; - char x_fsize[4]; /* size of function */ - } x_misc; - union { - struct { /* if ISFCN, tag, or .bb */ - char x_lnnoptr[4]; /* ptr to fcn line # */ - char x_endndx[4]; /* entry ndx past block end */ - } x_fcn; - struct { /* if ISARY, up to 4 dimen. */ - char x_dimen[E_DIMNUM][2]; - } x_ary; - } x_fcnary; - char x_tvndx[2]; /* tv index */ - } x_sym; - - union { - char x_fname[E_FILNMLEN]; - struct { - char x_zeroes[4]; - char x_offset[4]; - } x_n; - } x_file; - - struct { - char x_scnlen[4]; /* section length */ - char x_nreloc[2]; /* # relocation entries */ - char x_nlinno[2]; /* # line numbers */ - } x_scn; - - struct { - char x_tvfill[4]; /* tv fill value */ - char x_tvlen[2]; /* length of .tv */ - char x_tvran[2][2]; /* tv range */ - } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ - - -}; - -#define SYMENT struct external_syment -#define SYMESZ 18 -#define AUXENT union external_auxent -#define AUXESZ 18 - - - -/********************** RELOCATION DIRECTIVES **********************/ - -/* The external reloc has an offset field, because some of the reloc - types on the h8 don't have room in the instruction for the entire - offset - eg the strange jump and high page addressing modes */ - -struct external_reloc { - char r_vaddr[4]; - char r_symndx[4]; - char r_reserved[2]; - char r_type[2]; -}; - - -#define RELOC struct external_reloc -#define RELSZ 12 - -/* TIc80 relocation types. */ - -#define R_ABS 0x00 /* Absolute address - no relocation */ -#define R_RELLONGX 0x11 /* PP: 32 bits, direct */ -#define R_PPBASE 0x34 /* PP: Global base address type */ -#define R_PPLBASE 0x35 /* PP: Local base address type */ -#define R_PP15 0x38 /* PP: Global 15 bit offset */ -#define R_PP15W 0x39 /* PP: Global 15 bit offset divided by 4 */ -#define R_PP15H 0x3A /* PP: Global 15 bit offset divided by 2 */ -#define R_PP16B 0x3B /* PP: Global 16 bit offset for bytes */ -#define R_PPL15 0x3C /* PP: Local 15 bit offset */ -#define R_PPL15W 0x3D /* PP: Local 15 bit offset divided by 4 */ -#define R_PPL15H 0x3E /* PP: Local 15 bit offset divided by 2 */ -#define R_PPL16B 0x3F /* PP: Local 16 bit offset for bytes */ -#define R_PPN15 0x40 /* PP: Global 15 bit negative offset */ -#define R_PPN15W 0x41 /* PP: Global 15 bit negative offset divided by 4 */ -#define R_PPN15H 0x42 /* PP: Global 15 bit negative offset divided by 2 */ -#define R_PPN16B 0x43 /* PP: Global 16 bit negative byte offset */ -#define R_PPLN15 0x44 /* PP: Local 15 bit negative offset */ -#define R_PPLN15W 0x45 /* PP: Local 15 bit negative offset divided by 4 */ -#define R_PPLN15H 0x46 /* PP: Local 15 bit negative offset divided by 2 */ -#define R_PPLN16B 0x47 /* PP: Local 16 bit negative byte offset */ -#define R_MPPCR15W 0x4E /* MP: 15 bit PC-relative divided by 4 */ -#define R_MPPCR 0x4F /* MP: 32 bit PC-relative divided by 4 */ Index: we32k.h =================================================================== --- we32k.h (revision 1765) +++ we32k.h (nonexistent) @@ -1,206 +0,0 @@ -/*** coff information for we32k */ - -/********************** FILE HEADER **********************/ - -struct external_filehdr { - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ -}; - - -/* Bits for f_flags: - * F_RELFLG relocation info stripped from file - * F_EXEC file is executable (no unresolved external references) - * F_LNNO line numbers stripped from file - * F_LSYMS local symbols stripped from file - * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax) - */ - -#define F_RELFLG (0x0001) -#define F_EXEC (0x0002) -#define F_LNNO (0x0004) -#define F_LSYMS (0x0008) -#define F_BM32B (0020000) -#define F_BM32MAU (0040000) - -#define WE32KMAGIC 0x170 /* we32k sans transfer vector */ -#define FBOMAGIC 0x170 /* we32k sans transfer vector */ -#define MTVMAGIC 0x171 /* we32k with transfer vector */ -#define RBOMAGIC 0x172 /* reserved */ -#define WE32KBADMAG(x) (((x).f_magic != WE32KMAGIC) \ - && ((x).f_magic != FBOMAGIC) \ - && ((x).f_magic != RBOMAGIC) \ - && ((x).f_magic != MTVMAGIC)) - -#define FILHDR struct external_filehdr -#define FILHSZ 20 - - -/********************** AOUT "OPTIONAL HEADER" **********************/ - - -typedef struct -{ - char magic[2]; /* type of file */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ -} -AOUTHDR; - -#define AOUTSZ 28 -#define AOUTHDRSZ 28 - -/********************** SECTION HEADER **********************/ - - -struct external_scnhdr { - char s_name[8]; /* section name */ - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[2]; /* number of relocation entries */ - char s_nlnno[2]; /* number of line number entries*/ - char s_flags[4]; /* flags */ -}; - -#define SCNHDR struct external_scnhdr -#define SCNHSZ 40 - -/* - * names of "special" sections - */ -#define _TEXT ".text" -#define _DATA ".data" -#define _BSS ".bss" -#define _TV ".tv" -#define _INIT ".init" -#define _FINI ".fini" - -/********************** LINE NUMBERS **********************/ - -/* 1 line number entry for every "breakpointable" source line in a section. - * Line numbers are grouped on a per function basis; first entry in a function - * grouping will have l_lnno = 0 and in place of physical address will be the - * symbol table index of the function name. - */ -struct external_lineno { - union { - char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ - char l_paddr[4]; /* (physical) address of line number */ - } l_addr; - char l_lnno[2]; /* line number */ -}; - - -#define LINENO struct external_lineno -#define LINESZ 6 - - -/********************** SYMBOLS **********************/ - -#define E_SYMNMLEN 8 /* # characters in a symbol name */ -#define E_FILNMLEN 14 /* # characters in a file name */ -#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ - -struct external_syment -{ - union { - char e_name[E_SYMNMLEN]; - struct { - char e_zeroes[4]; - char e_offset[4]; - } e; - } e; - char e_value[4]; - char e_scnum[2]; - char e_type[2]; - char e_sclass[1]; - char e_numaux[1]; -}; - -#define N_BTMASK (0xf) -#define N_TMASK (0x30) -#define N_BTSHFT (4) -#define N_TSHIFT (2) - -union external_auxent { - struct { - char x_tagndx[4]; /* str, un, or enum tag indx */ - union { - struct { - char x_lnno[2]; /* declaration line number */ - char x_size[2]; /* str/union/array size */ - } x_lnsz; - char x_fsize[4]; /* size of function */ - } x_misc; - union { - struct { /* if ISFCN, tag, or .bb */ - char x_lnnoptr[4]; /* ptr to fcn line # */ - char x_endndx[4]; /* entry ndx past block end */ - } x_fcn; - struct { /* if ISARY, up to 4 dimen. */ - char x_dimen[E_DIMNUM][2]; - } x_ary; - } x_fcnary; - char x_tvndx[2]; /* tv index */ - } x_sym; - - union { - char x_fname[E_FILNMLEN]; - struct { - char x_zeroes[4]; - char x_offset[4]; - } x_n; - } x_file; - - struct { - char x_scnlen[4]; /* section length */ - char x_nreloc[2]; /* # relocation entries */ - char x_nlinno[2]; /* # line numbers */ - } x_scn; - - struct { - char x_tvfill[4]; /* tv fill value */ - char x_tvlen[2]; /* length of .tv */ - char x_tvran[2][2]; /* tv range */ - } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ - - -}; - -#define SYMENT struct external_syment -#define SYMESZ 18 -#define AUXENT union external_auxent -#define AUXESZ 18 - - -# define _ETEXT "etext" - - -/********************** RELOCATION DIRECTIVES **********************/ - - - -struct external_reloc { - char r_vaddr[4]; - char r_symndx[4]; - char r_type[2]; -}; - - -#define RELOC struct external_reloc -#define RELSZ 10 - Index: ChangeLog =================================================================== --- ChangeLog (revision 1765) +++ ChangeLog (nonexistent) @@ -1,882 +0,0 @@ -2000-04-07 Timothy Wall - - * internal.h: Fix some comments related to TI COFF (instead of tic80). - * ti.h: New. - * tic54x.h: New. - -Wed Apr 5 22:08:41 2000 J"orn Rennecke - - * sh.h (R_SH_LOOP_START, R_SH_LOOP_END): Define. - -2000-03-15 Kazu Hirata - - * internal.h: Fix a typo in the comment for R_MOVL2. - -2000-02-28 Nick Clifton - - * mipspe.h (MIPS_PE_MAGIC): Define. - * sh.h (SH_PE_MAGIC): Define. - -2000-02-22 Nick Clifton DJ Delorie - - * sh.h: Add Windows CE definitions. - * arm.h: Add Windows CE definitions. - * mipspe.h: New file: Windows CE definitions for MIPS. - * pe.h: Add constants for ILF support. - -2000-01-05 Nick Clifton - - * pe.h: Fix formatting of comments. - (IMAGE_FILE_AGGRESSIVE_WS_TRIM): Define. - (IMAGE_FILE_LARGE_ADDRESS_AWARE): Define. - (IMAGE_FILE_16BIT_MACHINE): Define. - (IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP): Define. - (IMAGE_FILE_UP_SYSTEM_ONLY): Define. - (IMAGE_FILE_MACHINE_UNKNOWN): Define. - (IMAGE_FILE_MACHINE_ALPHA): Define. - (IMAGE_FILE_MACHINE_ALPHA64): Define. - (IMAGE_FILE_MACHINE_I386): Define. - (IMAGE_FILE_MACHINE_IA64): Define. - (IMAGE_FILE_MACHINE_M68K): Define. - (IMAGE_FILE_MACHINE_MIPS16): Define. - (IMAGE_FILE_MACHINE_MIPSFPU): Define. - (IMAGE_FILE_MACHINE_MIPSFPU16): Define. - (IMAGE_FILE_MACHINE_POWERPC): Define. - (IMAGE_FILE_MACHINE_R3000): Define. - (IMAGE_FILE_MACHINE_R4000): Define. - (IMAGE_FILE_MACHINE_R10000): Define. - (IMAGE_FILE_MACHINE_SH3): Define. - (IMAGE_FILE_MACHINE_SH4): Define. - (IMAGE_FILE_MACHINE_THUMB): Define. - -1999-09-20 Alan Modra - - * internal.h: Delete bogus R_PCLONG, duplicate R_RELBYTE and - R_RELWORD, and rewrite some R_* as decimal. - -1999-09-06 Donn Terry - - * internal.h (DTYPE): Define. - * pe.h (struct external_PEI_filehdr): Rename from - external_PE_filehdr. Define even if COFF_IMAGE_WITH_PE is not - defined. - -1999-07-17 Nick Clifton - - * arm.h (F_SOFT_FLOAT): Rename from F_SOFTFLOAT. - -1999-06-21 Philip Blundell - - * arm.h (F_SOFTFLOAT): Define. - -1999-07-05 Nick Clifton - - * arm.h (F_ARM_5): Define. - -Wed Jun 2 18:08:18 1999 Richard Henderson - - * internal.h (BEOS_EXE_IMAGE_BASE, BEOS_DLL_IMAGE_BASE): New. - -Mon May 17 13:35:35 1999 Stan Cox - - * coff/arm.h (F_PIC, F_ARM_2, F_ARM_2a, F_ARM_3, F_ARM_3M, - F_ARM_4, F_ARM_4T, F_APCS26): Changed values to distinguish - F_ARM_2a, F_ARM_3M, F_ARM_4T. - -1999-05-15 Nick Clifton - - * mcore.h (IMAGE_REL_MCORE_RVA): Define. - -1999-04-21 Nick Clifton - - * mcore.h (GET_LINENO_LNNO): New macro. - (PUT_LINENO_LNNO): New macro. - -1999-04-08 Nick Clifton - - * mcore.h: New header file. Defines for Motorola's MCore - processor. - -Sun Dec 6 21:36:37 1998 Mark Elbrecht - - * internal.h (C_WEAKEXT): Define. - -Wed Jan 27 13:35:35 1999 Stan Cox - - * coff/arm.h (F_PIC_INT, F_ARM_2, F_ARM_3, F_ARM_4, F_APCS26): - Changed values to avoid clashing with IMAGE_FILE_* coff header - flag values. - -Wed Apr 1 16:06:15 1998 Nick Clifton - - * internal.h: Document numbers associated with Thumb symbol - types. - -Fri Mar 27 17:16:57 1998 Ian Lance Taylor - - * internal.h (ISPTR, ISFCN, ISARY): Add casts to unsigned long. - -Mon Feb 2 17:10:38 1998 Steve Haworth - - * tic30.h: New file. - -Fri Dec 12 11:49:07 1997 Fred Fish - - * tic80.h (R_MPPCR15W): New relocation type, for 15 bit PC relative - offsets. - -Tue Dec 2 10:21:40 1997 Nick Clifton - - * arm.h (COFFARM): New define. - -Sat Nov 22 15:10:14 1997 Nick Clifton - - * internal.h (C_THUMBEXTFUNC, C_THUMBSTATFUNC): Constants to - define static and external functions. - - * arm.h: Add bits to support PIC and APCS-FLOAT type binaries, - when implemented. - -Fri Oct 3 14:25:17 1997 Fred Fish - - * tic80.h (R_PPL16B): Make constant uppercase for consistency. - -Tue Jul 22 18:18:58 1997 Robert Hoehne - - * go32exe.h: New file. - -Tue Jul 8 12:23:55 1997 Fred Fish - - * tic80.h (TIC80_TARGET_ID): Add define. - * internal.h (struct internal_filehdr): Add f_target_id field. - -Tue Jun 3 16:44:18 1997 Nick Clifton - - * internal.h: Add storage classes for Thumb symbols - -Mon May 26 14:07:55 1997 Ian Lance Taylor - - * tic80.h (R_PPL16B): Correct value. - -Sat May 3 08:24:59 1997 Fred Fish - - * internal.h (C_UEXT, C_STATLAB, C_EXTLAB, C_SYSTEM): - New storage classes for TIc80. - -Fri Apr 18 11:52:55 1997 Niklas Hallqvist - - * alpha.h (ALPHA_ECOFF_BADMAG): Recognize *BSD/alpha magic too. - (ALPHA_R_LITERALSLEAZY): Define. - * ecoff.h (ALPHA_MAGIC_BSD): Define. - -Wed Jan 29 11:31:51 1997 Ian Lance Taylor - - * i960.h (R_IPR13, R_ALIGN): Define. - -Mon Jan 27 13:34:30 1997 Ian Lance Taylor - - * internal.h (R_IPRMED, R_OPTCALL, R_OPTCALLX): Move definitions - from here... - * i960.h (R_IPRMED, R_OPTCALL, R_OPTCALLX): ...to here. - -Wed Jan 22 20:10:47 1997 Fred Fish - - * tic80.h (TIC80MAGIC): Renamed to TIC80_AOUTHDR_MAGIC. - -Fri Dec 27 22:05:45 1996 Fred Fish - - * tic80.h: New file for TIc80 support. - -Thu Dec 19 16:18:11 1996 Ian Lance Taylor - - * arm.h (_LIT): Define. - -Fri Jun 28 12:54:38 1996 Ian Lance Taylor - - * pe.h (FILHSZ): Define. - -Wed Jun 26 16:24:26 1996 Ian Lance Taylor - - * All files: Define FILHSZ, AOUTSZ, AOUTHDRSZ, SCNHSZ, SYMESZ, - AUXESZ, LINESZ, RELSZ as numeric constants rather than uses of - sizeof. Define AOUTHDRSZ in all files. - * pe.h (AOUTSZ): Define by adding to AOUTHDRSZ. - -Fri Jun 21 11:17:46 1996 Richard Henderson - - * alpha.h: Add declarations for relocation types added for Alpha - OSF/1 3.0. - -Tue Jun 18 16:04:29 1996 Jeffrey A. Law - - * h8300.h (H8300SMAGIC): Define. - (H8300SBADMAG): Define. - -Mon Jun 10 11:53:28 1996 Jeffrey A Law (law@cygnus.com) - - * internal.h (R_BCC_INV, R_JMP_DEL): New relocations for - relaxing in the H8/300 series. - -Thu May 16 15:49:22 1996 Ian Lance Taylor - - * sh.h (R_SH_CODE, R_SH_DATA, R_SH_LABEL): Define. - -Tue May 7 00:36:39 1996 Jeffrey A Law (law@cygnus.com) - - * internal.h (R_JMPL2): Renamed from R_JMPL_B8 to be - consistent with other similar relocs. - - * internal.h (H8/300 specific relocs): Add comments better - explaining what each reloc is used for. - (R_MOV16B1, R_MOV16B2): Renamed from R_MOVB1 and R_MOVB2. - (R_MOV24B1, R_MOV24B2): Renamed from R_MOVLB1 and R_MOVLB2. - (R_MOVL1, R_MOVL2): New relocs. - -Fri May 3 13:01:12 1996 Jeffrey A Law (law@cygnus.com) - - * internal.h (R_PCRWORD_B): Define for the h8300 relaxing - linker. - -Wed May 1 19:21:03 1996 Ian Lance Taylor - - * internal.h (SCNNMLEN): Define. - (struct internal_scnhdr): Use SCNNMLEN for s_name field. - -Fri Mar 29 13:41:25 1996 Ian Lance Taylor - - * pe.h: Define IMAGE_COMDAT codes. - -Wed Mar 27 17:29:42 1996 Ian Lance Taylor - - * arm.h (union external_auxent): Add x_checksum, x_associated, and - x_comdat fields to x_scn struct. - * i386.h (union external_auxent): Likewise. - * powerpc.h (union external_auxent): Likewise. - * internal.h (union internal_auxent): Likewise. - -Thu Mar 21 16:25:57 1996 David Mosberger-Tang - - * ecoff.h (struct ecoff_find_line): Add caching fields. - -Thu Mar 14 15:22:44 1996 Jeffrey A Law (law@cygnus.com) - - * internal.h (R_MEM_INDIRECT): New reloc for the h8300. - -Fri Feb 9 10:44:11 1996 Ian Lance Taylor - - * aux-coff.h: Rename from aux.h, to avoid problems on hapless DOS - systems which think that aux is a com port. - -Mon Feb 5 18:35:00 1996 Ian Lance Taylor - - * i960.h (F_I960HX): Define. - -Wed Jan 31 13:11:54 1996 Richard Henderson - - * aux.h: New file. - * internal.h, m68k.h: Protect against multiple inclusion. - -Wed Nov 22 13:48:39 1995 Ian Lance Taylor - - * ecoff.h (_RCONST, STYP_RCONST, RELOC_SECTION_RCONST): Define. - (NUM_RELOC_SECTIONS): Update. - * symconst.h (scRConst): Define. - -Tue Nov 14 18:54:29 1995 Ian Lance Taylor - - * internal.h (C_NT_WEAK): Define. - -Thu Nov 9 14:08:30 1995 Ian Lance Taylor - - * rs6000.h (STYP_OVRFLO): Define. - -Tue Nov 7 14:38:45 1995 Kim Knuttila - - * coff/powerpc.h (IMAGE_NT_OPTIONAL_HDR_MAGIC): Added define. - * coff/pe.h: Added defines for file level flags - -Mon Nov 6 17:28:01 1995 Harry Dolan - - * i860.h: New file, based on i386.h. - -Wed Nov 1 15:25:18 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 - - * m68k.h (PAGEMAGICEXECSWAPPED): Define. - (PAGEMAGICPEXECSWAPPED): Define. - (PAGEMAGICPEXECTSHLIB): Define. - (PAGEMAGICPEXECPAGED): Define. - (_COMMENT): DEFINE. - * m88k.h (_COMMENT): Define. - -Wed Oct 18 18:36:19 1995 Geoffrey Noer - - * sym.h: #if 0'd out runtime_pdr struct because it chokes - Visual C++ and there aren't any references to it elsewhere in gdb. - -Mon Oct 16 11:12:24 1995 Ian Lance Taylor - - * rs6000.h (SMALL_AOUTSZ): Define. - - * internal.h (XMC_TD): Define. - -Tue Oct 10 18:41:03 1995 Ian Lance Taylor - - * internal.h (struct internal_aouthdr): Add o_cputype field. - * rs6000.h (AOUTHDR): Rename o_resv1 to o_cputype. - -Mon Oct 9 14:45:46 1995 Ian Lance Taylor - - * rs6000.h (AOUTHDR): Add o_maxdata field. Add comments. - (_PAD, _LOADER): Define. - (STYP_LOADER): Define. - * internal.h (struct internal_aouthdr): Add o_maxdata field. - -Thu Oct 5 10:02:57 1995 Ian Lance Taylor - - * ecoff.h: Define section name macros and STYP macros for various - Alpha sections: .got, .hash, .dynsym, .dynstr, .rel.dyn, .conflic, - .comment, .liblist, .dynamic. - -Wed Oct 4 10:56:35 1995 Kim Knuttila - - * pe.h: Moved DOSMAGIC and NT_SIGNATURE defines here - * powerpc.h: removed DOSMAGIC, NT_SIGNATURE, and DEFAULT_* defines - Also removed other unused defines (various MAGIC ones) - * i386.h: removed DOSMAGIC, NT_SIGNATURE, and DEFAULT_* defines - * arm.h: removed DOSMAGIC, NT_SIGNATURE, and DEFAULT_* defines - * apollo.h: removed unused DEFAULT_* defines - * alpha.h: removed unused DEFAULT_* defines - * h8500.h: removed unused DEFAULT_* defines - * h8300.h: removed unused DEFAULT_* defines - * i960.h: removed unused DEFAULT_* defines - * m88k.h: removed unused DEFAULT_* defines - * we32k.h: removed unused DEFAULT_* defines - * rs6000.h: removed unused DEFAULT_* defines - * mips.h: removed unused DEFAULT_* defines - * m68k.h: removed unused DEFAULT_* defines - * z8k.h: removed unused DEFAULT_* defines - * w65.h: removed unused DEFAULT_* defines - * sparc.h: removed unused DEFAULT_* defines - * sh.h: removed unused DEFAULT_* defines - -Fri Sep 29 08:40:08 1995 Kim Knuttila - - * powerpc.h: Reformatted to GNU coding conventions. - -Wed Sep 27 06:50:50 1995 Kim Knuttila - - * pe.h: added defines for more section characteristics - * powerpc.h (new file): base coff definitions for ppc PE - -Tue Sep 12 12:08:20 1995 Ian Lance Taylor - - * internal.h (struct internal_syment): Change n_numaux field from - char to unsigned char. - -Fri Sep 1 15:39:36 1995 Kazumoto Kojima - - * mips.h (struct rpdr_ext): Define. - -Thu Aug 31 16:51:50 1995 steve chamberlain - - * internal.h (internal_aouthdr, internal_filehdr): - don't indirect the pe stuff. - -Tue Aug 29 14:16:07 1995 steve chamberlain - - * i386.h (NT_DEF_RESERVE, NT_DEF_COMMIT): Make the same - as 'the other' compiler. - * internal.h (NT_IMAGE_BASE): Deleted. - (NT_EXE_IMAGE_BASE, NT_DLL_IMAGE_BASE): New. - (PE_DEF_SECTION_ALIGNMENT, PE_DEF_FILE_ALIGNMENT): New. - (R_IMAGEBASE): New. - -Mon Aug 21 18:12:19 1995 steve chamberlain - - * internal.h: (internal_filehdr): Moved PE stuff into - internal_extra_pe_filehdr. - (internal_aouthdr): Moved PE stuff into - interanl_extra_pe_aouthdr. - -Mon Jul 24 14:05:39 1995 Ian Lance Taylor - - * internal.h: Move R_SH_* relocs from here... - * sh.h: ...to here. - (R_SH_SWITCH16, R_SH_SWITCH32): Define. - (R_SH_USES, R_SH_COUNT, R_SH_ALIGN): Define. - -Thu Jun 29 00:04:25 1995 Steve Chamberlain - - * internal.h (NT_DEF_RESERVE, NT_DEF_COMMIT): Increase a lot. - -Tue May 16 15:08:20 1995 Ken Raeburn - - * internal.h (NT_subsystem, NT_stack_heap): Delete - -Tue May 16 15:08:20 1995 Ken Raeburn - - * internal.h (NT_subsystem, NT_stack_heap): Now extern. - -Tue Feb 14 17:59:37 1995 Ian Lance Taylor - - * ecoff.h (struct ecoff_fdrtab_entry): Define. - (struct ecoff_find_line): Define. - -Sat Feb 4 14:38:03 1995 David Mosberger-Tang - - * sym.h (struct pdr): field "prof" added. - - * alpha.h (PDR_BITS1_PROF_*): added, macros for PDR_BITS*_RESERVED_* - updated accordingly. - -Sun Jan 15 18:38:33 1995 Steve Chamberlain - - * w65.h: New file. - -Wed Nov 23 22:43:38 1994 Steve Chamberlain (sac@jonny.cygnus.com) - - * sh.h (SH_ARCH_MAGIC_BIG, SH_ARCH_MAGIC_LITTLE): New. - (SHBADMAG): Changed to suit. - -Tue Jul 26 17:46:08 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * i960.h (F_I960JX): New macro. - -Wed Jul 6 00:48:57 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) - - * alpha.h: Add definitions for alpha file header flags, encoding - the object type of the file. - -Mon Jun 20 13:47:01 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * ecoff.h (ecoff_swap_tir_in): Remove declaration. - (ecoff_swap_tir_out): Likewise. - (ecoff_swap_rndx_in, ecoff_swap_rndx_out): Likewise. - (struct ecoff_debug_swap): Add new fields: swap_tir_in, - swap_rndx_in, swap_tir_out, swap_rndx_out, read_debug_info. - -Sun Jun 12 03:51:52 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) - - * symconst.h: Pick up SGI define for stIndirect. - -Fri Apr 22 13:05:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ecoff.h (REGINFO): Don't define. - (struct ecoff_reginfo): Don't define. - - * sh.h (SH_ARCH_MAGIC): Rename from SHMAGIC. SHMAGIC is used by - several targets to mean a shared library. - (SHBADMAG): Corresponding change. - -Thu Apr 14 13:00:53 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * mips.h (RELOC_BITS3_TYPE_BIG): Changed from 0x1e to 0x3e. - (RELOC_BITS3_TYPEHI_LITTLE): Define. - (RELOC_BITS3_TYPEHI_SH_LITTLE): Define. - (MIPS_R_PCREL16): Change value from 8 to 12 to match Irix 4. - (MIPS_R_RELHI): Define. - (MIPS_R_RELLO): Define. - (MIPS_R_SWITCH): Change value from 9 to 22. - -Thu Apr 7 14:19:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * mips.h (MIPS_R_SWITCH): Define. - -Thu Mar 31 19:28:33 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * internal.h (internal_aouthdr): Added comments for Apollo fields. - -Thu Mar 31 16:28:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ecoff.h (STYP_ECOFF_LIB): Define as used on Irix 4. - -Fri Mar 25 17:16:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ecoff.h (struct ecoff_debug_info): Add adjust field. - (struct ecoff_value_adjust): Define. - -Tue Mar 22 13:22:47 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * mips.h (MIPS_R_PCREL16): Define. - -Sat Feb 26 10:26:38 1994 Ian Lance Taylor (ian@cygnus.com) - - * ecoff.h: Add casts to avoid warnings from SVR4 cc. - -Mon Feb 21 09:48:46 1994 Ian Lance Taylor (ian@lisa.cygnus.com) - - * sym.h (struct runtime_pdr): Make field adr bfd_vma, not unsigned - long. - (SYMR): Make field value bfd_vma, not long. - -Fri Feb 4 23:35:53 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * rs6000.h (STYP_DEBUG): Define. - -Wed Feb 2 14:31:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * internal.h (union internal_auxent): Change x_csect.x_scnlen into - a union of a long and a pointer to a symbol. XCOFF sometimes uses - this field as a symbol index. - -Mon Jan 10 23:54:25 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ecoff.h (ecoff_debug_info): Remove fields line_end, - external_dnr_end, external_pdr_end, external_sym_end, - external_opt_end, external_aux_end, ss_end, external_fdr_end. - Replace ifdbase with ifdmap. - -Wed Jan 5 17:05:36 1994 Ken Raeburn (raeburn@deneb.cygnus.com) - - * ecoff.h (STYP_EXTENDESC, STYP_COMMENT, STYP_XDATA, STYP_PDATA): - Define. - -Wed Jan 5 16:58:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ecoff.h (NUM_RELOC_SECTIONS): Define. - -Tue Dec 21 09:24:56 1993 Ken Raeburn (raeburn@rtl.cygnus.com) - - * sparc.h (struct external_reloc): Rename field r_addend to - r_offset. - -Sat Dec 11 16:12:32 1993 Steve Chamberlain (sac@thepub.cygnus.com) - - * internal.h (R_DISP7, R_SH_IMM16): New reloc types. - -Tue Nov 23 14:23:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ecoff.h (struct ecoff_debug_swap): Added *_end fields for all - the symbolic information pointers. - - * sym.h: Named the EXTR structure ecoff_extr. - -Fri Nov 19 08:21:18 1993 Ken Raeburn (raeburn@rover.cygnus.com) - - * sparc.h (RELSZ): Use correct size. - -Wed Nov 17 17:18:16 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * mips.h (struct ecoff_debug_info): Define. - -Tue Nov 2 17:56:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ecoff.h (struct ecoff_debug_swap): Define. - -Thu Oct 28 17:07:50 1993 Stan Shebs (shebs@rtl.cygnus.com) - - * i386.h (I386LYNXMAGIC): Rename to LYNXCOFFMAGIC. - * m68k.h (LYNXCOFFMAGIC): Define. - * sparc.h: New file. - -Tue Oct 19 15:34:50 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * alpha.h (external_aouthdr): Split four byte padding field into - two byte bldrev field and two byte padding field. - - * ecoff.h (_LITA, _PDATA, _XDATA, STYP_LITA): Defined. - -Wed Oct 13 15:52:34 1993 Ken Raeburn (raeburn@cygnus.com) - - Sun Oct 10 17:27:10 1993 Troy Rollo (troy@cbme.unsw.edu.au) - - * coff/internal.h: Added o_sri, o_inlib and o_vid for Apollos - as well as R_DIR16. - - * coff/apollo.h: New file - -Mon Oct 11 17:16:48 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ecoff.h (REGINFO, struct ecoff_reginfo): Define. - -Tue Oct 5 10:52:53 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * rs6000.h: Change non-ASCII characters in comment to octal - escapes. - -Tue Sep 28 03:27:04 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) - - * ecoff.h (_FINI, STYP_ECOFF_FINI): Add to support .fini section. - -Fri Sep 24 11:53:53 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * mips.h (BADMAG): Recognize MIPS_MAGIC_LITTLE3 and MIPS_MAGIC_BIG3. - * ecoff.h: Define MIPS_MAGIC_LITTLE3 and MIPS_MAGIC_BIG3. - -Thu Sep 23 21:07:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * mips.h (BADMAG): Recognize MIPS_MAGIC_LITTLE2 and MIPS_MAGIC_BIG2. - * ecoff.h: Define MIPS_MAGIC_LITTLE2 and MIPS_MAGIC_BIG2. - -Thu Sep 16 20:27:21 1993 Jim Kingdon (kingdon@cirdan.cygnus.com) - - * sym.h, symconst.h: Add comment stating these files are not part - of GDB, GAS, etc. In 1991, when we asked rms whether we could - include these files in GDB (although they are copyrighted by - someone besides the FSF), he said it was OK if they were not - considered part of GDB. - -Fri Sep 10 17:40:35 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ecoff.h (AUX_PUT_ANY): Cast val argument to bfd_vma. - - * alpha.c (external_aouthdr): Need four bytes of padding between - vstamp and tsize. - -Tue Sep 7 14:20:43 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ecoff.h (AUX_GET_ANY, AUX_PUT_ANY): Changed to reflect further - change in bfd swapping routine names. - -Tue Sep 7 10:15:17 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * ecoff.h (AUX_GET_ANY): Change name of _do_getb32 to reflect bfd - changes. - -Fri Aug 13 14:30:32 1993 Ian Lance Taylor (ian@cygnus.com) - - * ecoff.h (RELOC_SECTION_NONE): Define. - -Thu Aug 12 11:24:42 1993 Ian Lance Taylor (ian@cygnus.com) - - * alpha.h (struct external_reloc): Add r_symndx field. - (RELSZ): Correct. - (RELOC_BITS*): Correct. - (ALPHA_R_*): Define. - * ecoff.h (RELOC_SECTION_{XDATA,PDATA,FINI,LITA,ABS}): Define. - (r_extern): Undefine. - * internal.h (struct internal_reloc): Make r_vaddr bfd_vma rather - than long. Add r_extern field. - - * alpha.h (PDR_BITS*): Define. - * sym.h (PDR): Give correct names to new fields. - - * ecoff.h: Moved MIPS reloc definitions from here... - * mips.h: to here. - -Tue Aug 3 11:17:53 1993 Ian Lance Taylor (ian@cygnus.com) - - * alpha.h: Corrected external symbolic debugging structures to - match actual usage. - * internal.h (internal_filehdr, internal_aouthdr, - internal_scnhdr): Changed type of some fields to bfd_vma so they - can hold 64 bits. - * sym.h (HDRR, FDR, PDR, EXTR): Likewise. - (PDR): Added new fields found on Alpha. - * symconst.h (magicSym2): Define; new value found on Alpha. - - * 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. - -Thu Jul 15 12:23:55 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * m88k.h (union external_auxent): Move x_fcn back inside x_fcnary. - ({GET,PUT}_FCN_{LNNOPTR,ENDNDX}): Adjust accordingly. - -Sun Jul 11 18:00:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * m68k.h: Define MC68KBCSMAGIC. - -Thu Jun 10 11:46:28 1993 Ian Lance Taylor (ian@cygnus.com) - - * mips.h (_INIT, STYP_MIPS_INIT): Define (used on Irix4). - (STYP_OTHER_LOAD): Define as STYP_MIPS_INIT. - -Wed Jun 9 15:09:09 1993 Ian Lance Taylor (ian@cygnus.com) - - * mips.h (OMAGIC): Define. - -Mon Apr 26 18:04:47 1993 Steve Chamberlain (sac@thepub.cygnus.com) - - * internal.h, sh.h: Support for SH. - -Sat Apr 24 21:34:59 1993 Jim Kingdon (kingdon@cygnus.com) - - * a29k.h: Define _LIT. - -Fri Apr 23 18:41:23 1993 Steve Chamberlain (sac@thepub.cygnus.com) - - * alpha.h: New file. - -Thu Apr 8 12:36:34 1993 Ian Lance Taylor (ian@cygnus.com) - - * internal.h (C_SHADOW, C_VERSION): Copied in from m88k.h. - * m88k.h, i386.h, we32k.h: Don't define all the storage classes; - they're already in internal.h. - -Wed Apr 7 11:51:24 1993 Jim Kingdon (kingdon@cygnus.com) - - * internal.h: Change n_sclass to unsigned char. - Change C_EFCN to 0xff, change RS/6000 dbx symbols - to no longer be signed. - -Fri Mar 19 14:52:56 1993 Steve Chamberlain (sac@thepub.cygnus.com) - - * internal.h: Add H8/500 reloc types. - -Wed Mar 17 09:46:03 1993 Ian Lance Taylor (ian@cygnus.com) - - * ecoff-ext.h (AUX_PUT_ANY): Don't use void values in branches of - conditional expression. - -Thu Mar 4 14:12:06 1993 Ian Lance Taylor (ian@cygnus.com) - - * ecoff-ext.h (AUX_GET_*): Rewrote to use new macro AUX_GET_ANY. - (AUX_PUT_*): New macros corresponding to the AUX_GET macros. - (ecoff_swap_tir_out): Added prototype. - - * mips.h (N_BTMASK, N_TMASK, N_BTSHFT, N_TSHIFT): Define; these - are needed to interpret gcc debugging output. - -Tue Feb 9 07:43:27 1993 Ian Lance Taylor (ian@cygnus.com) - - * we32k.h (BTYPE, ISPTR, ISFCN, ISARY, DECREF): Removed - more definitions duplicated in internal.h. - -Wed Feb 3 09:18:24 1993 Ian Lance Taylor (ian@cygnus.com) - - * mips.h (RELOC_BITS3_TYPE_*): Correct for big endian machines. - -Mon Jan 25 11:35:51 1993 Ian Lance Taylor (ian@cygnus.com) - - * internal.h (internal_aouthdr): Added additional fields used only - by MIPS ECOFF. - -Thu Jan 21 10:28:38 1993 Ian Lance Taylor (ian@cygnus.com) - - * mips.h (AOUTHDR): Added additional fields used by ECOFF. - -Tue Jan 19 12:21:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * i386.h, we32k.h (N_*, T_*, DT_*): Removed still more definitions - duplicated in internal.h. - - * mips.h (RELOC_SECTION_*, ECOFF_R_*): Defined constants for ECOFF - relocs. - -Fri Jan 15 18:17:00 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ecoff-ext.h: Added prototypes for new ECOFF swapping functions. - (opt_ext): New structure. - * mips.h (ZMAGIC): Defined to be 0413. - (_LIB): Defined to be ".lib" - (external_reloc): MIPS ECOFF relocs are only 8 bytes. Added - macros to aid in swapping. - -Fri Jan 8 16:19:26 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ecoff-ext.h: Added prototypes for ECOFF swapping functions. - * internal.h (internal_scnhdr): Always provide s_align field, not - just on i960. - (internal_reloc): Always provide r_size field, not just on - RS/6000. - * mips.h (_RDATA, _SDATA, _SBSS, _LIT4, _LIT8, STYP_RDATA, - STYP_SDATA, STYP_SBSS, STYP_LIT4, STYP_LIT8): Defined. - (CODE_MASK, MIPS_IS_STAB, MIPS_MARK_STAB, MIPS_UNMARK_STAB, - STABS_SYMBOL): Moved in from gdb/mipsread.c. - -Wed Jan 6 14:01:46 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * i386.h, we32k.h: removed STYP_* defines, since they duplicated - those in internal.h. - -Tue Dec 29 15:40:07 1992 Ian Lance Taylor (ian@cygnus.com) - - * i386.h: define I386AIXMAGIC for Danbury AIX PS/2 compiler. - -Sat Dec 12 16:07:57 1992 Ian Lance Taylor (ian@cygnus.com) - - * i386.h: don't define BTYPE, ISPTR, ISFCN, ISARY, DECREF: they - are defined in internal.h. - -Thu Nov 12 09:52:01 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * internal.h: (internal_reloc): r_offset is now a long. - * z8k.h: slight comment enhancement - -Wed Sep 30 07:46:08 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * internal.h: changed z8k reloc types - -Fri Aug 28 10:16:31 1992 Brendan Kehoe (brendan@cygnus.com) - - * we32k.h: new file - -Thu Aug 27 13:00:01 1992 Brendan Kehoe (brendan@cygnus.com) - - * symconst.h: comment out cruft at the end of #endif - -Tue Aug 25 15:06:49 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * internal.h: added #define for STYP_LIT, removed from a29k and - h8300. - - * z8k.h: added z8000 support - -Thu Jul 16 16:32:00 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * internal.h: added R_RELLONG_NEG reloc type - -Fri Jun 12 20:11:04 1992 John Gilmore (gnu at cygnus.com) - - * symconst.h: Fix unterminated comment. - -Wed Jun 10 07:57:49 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * i386.h: a.out magic numbers from - mohring@informatik.tu-muenchen.de - -Mon Jun 8 20:13:33 1992 John Gilmore (gnu at cygnus.com) - - * ecoff-ext.h, mips.h: Use unsigned chars everywhere. - (Suggested by Antti Miettinen.) - -Tue Apr 14 15:18:44 1992 John Gilmore (gnu at cygnus.com) - - * sym.h: Add comments. - * symconst.h: Merge with Fred's changes. - -Tue Apr 14 14:30:05 1992 Fred Fish (fnf@cygnus.com) - - * symconst.h: Pick up SGI defines for stStruct, stUnion, stEnum, - langCplusplus, and langCplusplusV2. - -Thu Apr 2 19:47:43 1992 John Gilmore (gnu at cygnus.com) - - * sym.h, symconst.h: MIPS has provided redistributable versions - of these files. Thanks! - * ecoff-ext.h: Add weakext bit to match new sym.h. - -Fri Mar 6 00:10:46 1992 John Gilmore (gnu at cygnus.com) - - * ecoff-ext.h: Add relative file descriptors. - -Thu Feb 27 11:53:04 1992 John Gilmore (gnu at cygnus.com) - - * ecoff-ext.h: New file for external (in-file) form of ecoff - symbol structures. - -Thu Feb 6 11:33:32 1992 Steve Chamberlain (sac at rtl.cygnus.com) - - * h8300.h: made the external_lineno l_lnno field 4 bytes wide. - andded GET/PUT_LINENO_LNNO macros - -Sat Nov 30 20:38:35 1991 Steve Chamberlain (sac at rtl.cygnus.com) - - * ChangeLog, a29k.h, h8300.h, i386.h, i960.h, internal.h, m68k.h, - m88k.h, mips.h, rs6000.h: move from above coff-.h - - -Local Variables: -version-control: never -End: Index: pe.h =================================================================== --- pe.h (revision 1765) +++ pe.h (nonexistent) @@ -1,198 +0,0 @@ -/* PE COFF header information */ - -#ifndef _PE_H -#define _PE_H - -/* NT specific file attributes. */ -#define IMAGE_FILE_RELOCS_STRIPPED 0x0001 -#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 -#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 -#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 -#define IMAGE_FILE_AGGRESSIVE_WS_TRIM 0x0010 -#define IMAGE_FILE_LARGE_ADDRESS_AWARE 0x0020 -#define IMAGE_FILE_16BIT_MACHINE 0x0040 -#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080 -#define IMAGE_FILE_32BIT_MACHINE 0x0100 -#define IMAGE_FILE_DEBUG_STRIPPED 0x0200 -#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 0x0400 -#define IMAGE_FILE_SYSTEM 0x1000 -#define IMAGE_FILE_DLL 0x2000 -#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000 -#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000 - -/* Additional flags to be set for section headers to allow the NT loader to - read and write to the section data (to replace the addresses of data in - dlls for one thing); also to execute the section in .text's case. */ -#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000 -#define IMAGE_SCN_MEM_EXECUTE 0x20000000 -#define IMAGE_SCN_MEM_READ 0x40000000 -#define IMAGE_SCN_MEM_WRITE 0x80000000 - -/* Section characteristics added for ppc-nt. */ - -#define IMAGE_SCN_TYPE_NO_PAD 0x00000008 /* Reserved. */ - -#define IMAGE_SCN_CNT_CODE 0x00000020 /* Section contains code. */ -#define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040 /* Section contains initialized data. */ -#define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080 /* Section contains uninitialized data. */ - -#define IMAGE_SCN_LNK_OTHER 0x00000100 /* Reserved. */ -#define IMAGE_SCN_LNK_INFO 0x00000200 /* Section contains comments or some other type of information. */ -#define IMAGE_SCN_LNK_REMOVE 0x00000800 /* Section contents will not become part of image. */ -#define IMAGE_SCN_LNK_COMDAT 0x00001000 /* Section contents comdat. */ - -#define IMAGE_SCN_MEM_FARDATA 0x00008000 - -#define IMAGE_SCN_MEM_PURGEABLE 0x00020000 -#define IMAGE_SCN_MEM_16BIT 0x00020000 -#define IMAGE_SCN_MEM_LOCKED 0x00040000 -#define IMAGE_SCN_MEM_PRELOAD 0x00080000 - -#define IMAGE_SCN_ALIGN_1BYTES 0x00100000 -#define IMAGE_SCN_ALIGN_2BYTES 0x00200000 -#define IMAGE_SCN_ALIGN_4BYTES 0x00300000 -#define IMAGE_SCN_ALIGN_8BYTES 0x00400000 -#define IMAGE_SCN_ALIGN_16BYTES 0x00500000 /* Default alignment if no others are specified. */ -#define IMAGE_SCN_ALIGN_32BYTES 0x00600000 -#define IMAGE_SCN_ALIGN_64BYTES 0x00700000 - -#define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000 /* Section contains extended relocations. */ -#define IMAGE_SCN_MEM_NOT_CACHED 0x04000000 /* Section is not cachable. */ -#define IMAGE_SCN_MEM_NOT_PAGED 0x08000000 /* Section is not pageable. */ -#define IMAGE_SCN_MEM_SHARED 0x10000000 /* Section is shareable. */ - -/* COMDAT selection codes. */ - -#define IMAGE_COMDAT_SELECT_NODUPLICATES (1) /* Warn if duplicates. */ -#define IMAGE_COMDAT_SELECT_ANY (2) /* No warning. */ -#define IMAGE_COMDAT_SELECT_SAME_SIZE (3) /* Warn if different size. */ -#define IMAGE_COMDAT_SELECT_EXACT_MATCH (4) /* Warn if different. */ -#define IMAGE_COMDAT_SELECT_ASSOCIATIVE (5) /* Base on other section. */ - -/* Machine numbers. */ - -#define IMAGE_FILE_MACHINE_UNKNOWN 0x0 -#define IMAGE_FILE_MACHINE_ALPHA 0x184 -#define IMAGE_FILE_MACHINE_ARM 0x1c0 -#define IMAGE_FILE_MACHINE_ALPHA64 0x284 -#define IMAGE_FILE_MACHINE_I386 0x14c -#define IMAGE_FILE_MACHINE_IA64 0x200 -#define IMAGE_FILE_MACHINE_M68K 0x268 -#define IMAGE_FILE_MACHINE_MIPS16 0x266 -#define IMAGE_FILE_MACHINE_MIPSFPU 0x366 -#define IMAGE_FILE_MACHINE_MIPSFPU16 0x466 -#define IMAGE_FILE_MACHINE_POWERPC 0x1f0 -#define IMAGE_FILE_MACHINE_R3000 0x162 -#define IMAGE_FILE_MACHINE_R4000 0x166 -#define IMAGE_FILE_MACHINE_R10000 0x168 -#define IMAGE_FILE_MACHINE_SH3 0x1a2 -#define IMAGE_FILE_MACHINE_SH4 0x1a6 -#define IMAGE_FILE_MACHINE_THUMB 0x1c2 - -/* Magic values that are true for all dos/nt implementations */ -#define DOSMAGIC 0x5a4d -#define NT_SIGNATURE 0x00004550 - - /* NT allows long filenames, we want to accommodate this. This may break - some of the bfd functions */ -#undef FILNMLEN -#define FILNMLEN 18 /* # characters in a file name */ - -struct external_PEI_filehdr -{ - /* DOS header fields */ - char e_magic[2]; /* Magic number, 0x5a4d */ - char e_cblp[2]; /* Bytes on last page of file, 0x90 */ - char e_cp[2]; /* Pages in file, 0x3 */ - char e_crlc[2]; /* Relocations, 0x0 */ - char e_cparhdr[2]; /* Size of header in paragraphs, 0x4 */ - char e_minalloc[2]; /* Minimum extra paragraphs needed, 0x0 */ - char e_maxalloc[2]; /* Maximum extra paragraphs needed, 0xFFFF */ - char e_ss[2]; /* Initial (relative) SS value, 0x0 */ - char e_sp[2]; /* Initial SP value, 0xb8 */ - char e_csum[2]; /* Checksum, 0x0 */ - char e_ip[2]; /* Initial IP value, 0x0 */ - char e_cs[2]; /* Initial (relative) CS value, 0x0 */ - char e_lfarlc[2]; /* File address of relocation table, 0x40 */ - char e_ovno[2]; /* Overlay number, 0x0 */ - char e_res[4][2]; /* Reserved words, all 0x0 */ - char e_oemid[2]; /* OEM identifier (for e_oeminfo), 0x0 */ - char e_oeminfo[2]; /* OEM information; e_oemid specific, 0x0 */ - char e_res2[10][2]; /* Reserved words, all 0x0 */ - char e_lfanew[4]; /* File address of new exe header, 0x80 */ - char dos_message[16][4]; /* other stuff, always follow DOS header */ - char nt_signature[4]; /* required NT signature, 0x4550 */ - - /* From standard header */ - - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ - -}; - -#ifdef COFF_IMAGE_WITH_PE - -/* The filehdr is only weird in images. */ - -#undef FILHDR -#define FILHDR struct external_PEI_filehdr -#undef FILHSZ -#define FILHSZ 152 - -#endif /* COFF_IMAGE_WITH_PE */ - -typedef struct -{ - AOUTHDR standard; - - /* NT extra fields; see internal.h for descriptions */ - char ImageBase[4]; - char SectionAlignment[4]; - char FileAlignment[4]; - char MajorOperatingSystemVersion[2]; - char MinorOperatingSystemVersion[2]; - char MajorImageVersion[2]; - char MinorImageVersion[2]; - char MajorSubsystemVersion[2]; - char MinorSubsystemVersion[2]; - char Reserved1[4]; - char SizeOfImage[4]; - char SizeOfHeaders[4]; - char CheckSum[4]; - char Subsystem[2]; - char DllCharacteristics[2]; - char SizeOfStackReserve[4]; - char SizeOfStackCommit[4]; - char SizeOfHeapReserve[4]; - char SizeOfHeapCommit[4]; - char LoaderFlags[4]; - char NumberOfRvaAndSizes[4]; - /* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */ - char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars */ - -} PEAOUTHDR; - - -#undef AOUTSZ -#define AOUTSZ (AOUTHDRSZ + 196) - -#undef E_FILNMLEN -#define E_FILNMLEN 18 /* # characters in a file name */ - -/* Import Tyoes fot ILF format object files.. */ -#define IMPORT_CODE 0 -#define IMPORT_DATA 1 -#define IMPORT_CONST 2 - -/* Import Name Tyoes for ILF format object files. */ -#define IMPORT_ORDINAL 0 -#define IMPORT_NAME 1 -#define IMPORT_NAME_NOPREFIX 2 -#define IMPORT_NAME_UNDECORATE 3 - -#endif /* _PE_H */ Index: sparc.h =================================================================== --- sparc.h (revision 1765) +++ sparc.h (nonexistent) @@ -1,210 +0,0 @@ -/*** coff information for Sparc. */ - -/* This file is an amalgamation of several standard include files that - define coff format, such as filehdr.h, aouthdr.h, and so forth. In - addition, all datatypes have been translated into character arrays of - (presumed) equivalent size. This is necessary so that this file can - be used with different systems while still yielding the same results. */ - -/********************** FILE HEADER **********************/ - -struct external_filehdr -{ - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ -}; - -#define F_RELFLG (0x0001) /* relocation info stripped */ -#define F_EXEC (0x0002) /* file is executable */ -#define F_LNNO (0x0004) /* line numbers stripped */ -#define F_LSYMS (0x0008) /* local symbols stripped */ - -#define SPARCMAGIC (0540) - -/* This is Lynx's all-platform magic number for executables. */ - -#define LYNXCOFFMAGIC (0415) - -#define FILHDR struct external_filehdr -#define FILHSZ 20 - -/********************** AOUT "OPTIONAL HEADER" **********************/ - -typedef struct -{ - char magic[2]; /* type of file */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ -} -AOUTHDR; - -#define AOUTSZ 28 -#define AOUTHDRSZ 28 - -#define OMAGIC 0404 /* object files, eg as output */ -#define ZMAGIC 0413 /* demand load format, eg normal ld output */ -#define STMAGIC 0401 /* target shlib */ -#define SHMAGIC 0443 /* host shlib */ - -/********************** SECTION HEADER **********************/ - -struct external_scnhdr -{ - char s_name[8]; /* section name */ - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[2]; /* number of relocation entries */ - char s_nlnno[2]; /* number of line number entries*/ - char s_flags[4]; /* flags */ -}; - -#define SCNHDR struct external_scnhdr -#define SCNHSZ 40 - -/* Names of "special" sections. */ - -#define _TEXT ".text" -#define _DATA ".data" -#define _BSS ".bss" -#define _TV ".tv" -#define _INIT ".init" -#define _FINI ".fini" -#define _COMMENT ".comment" -#define _LIB ".lib" - -/********************** LINE NUMBERS **********************/ - -/* 1 line number entry for every "breakpointable" source line in a section. - Line numbers are grouped on a per function basis; first entry in a function - grouping will have l_lnno = 0 and in place of physical address will be the - symbol table index of the function name. */ - -struct external_lineno -{ - union { - char l_symndx[4]; /* fn name symbol index, iff l_lnno == 0 */ - char l_paddr[4]; /* (physical) address of line number */ - } l_addr; - char l_lnno[2]; /* line number */ -}; - -#define LINENO struct external_lineno -#define LINESZ (6) - -/********************** SYMBOLS **********************/ - -#define E_SYMNMLEN (8) /* # characters in a symbol name */ -#define E_FILNMLEN (14) /* # characters in a file name */ -#define E_DIMNUM (4) /* # array dimensions in auxiliary entry */ - -struct external_syment -{ - union { - char e_name[E_SYMNMLEN]; - struct { - char e_zeroes[4]; - char e_offset[4]; - } e; -#if 0 /* of doubtful value */ - char e_nptr[2][4]; - struct { - char e_leading_zero[1]; - char e_dbx_type[1]; - char e_dbx_desc[2]; - } e_dbx; -#endif - } e; - - char e_value[4]; - char e_scnum[2]; - char e_type[2]; - char e_sclass[1]; - char e_numaux[1]; - char padding[2]; -}; - -#define N_BTMASK (0xf) -#define N_TMASK (0x30) -#define N_BTSHFT (4) -#define N_TSHIFT (2) - -union external_auxent -{ - struct { - char x_tagndx[4]; /* str, un, or enum tag indx */ - union { - struct { - char x_lnno[2]; /* declaration line number */ - char x_size[2]; /* str/union/array size */ - } x_lnsz; - char x_fsize[4]; /* size of function */ - } x_misc; - union { - struct { /* if ISFCN, tag, or .bb */ - char x_lnnoptr[4]; /* ptr to fcn line # */ - char x_endndx[4]; /* entry ndx past block end */ - } x_fcn; - struct { /* if ISARY, up to 4 dimen. */ - char x_dimen[E_DIMNUM][2]; - } x_ary; - } x_fcnary; - char x_tvndx[2]; /* tv index */ - } x_sym; - - union { - char x_fname[E_FILNMLEN]; - struct { - char x_zeroes[4]; - char x_offset[4]; - } x_n; - } x_file; - - struct { - char x_scnlen[4]; /* section length */ - char x_nreloc[2]; /* # relocation entries */ - char x_nlinno[2]; /* # line numbers */ - } x_scn; - - struct { - char x_tvfill[4]; /* tv fill value */ - char x_tvlen[2]; /* length of .tv */ - char x_tvran[2][2]; /* tv range */ - } x_tv; /* .tv section info (in auxent of sym .tv)) */ - - char x_fill[20]; /* forces to 20-byte size */ -}; - -#define SYMENT struct external_syment -#define SYMESZ 20 -#define AUXENT union external_auxent -#define AUXESZ 20 - -#define _ETEXT "etext" - -/********************** RELOCATION DIRECTIVES **********************/ - -struct external_reloc { - char r_vaddr[4]; - char r_symndx[4]; - char r_type[2]; - char r_spare[2]; - char r_offset[4]; -}; - -#define RELOC struct external_reloc -#define RELSZ 16 - Index: mips.h =================================================================== --- mips.h (revision 1765) +++ mips.h (nonexistent) @@ -1,369 +0,0 @@ -/* ECOFF support on MIPS 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[4]; /* 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 MIPS_ECOFF_BADMAG(x) (((x).f_magic!=MIPS_MAGIC_1) && \ - ((x).f_magic!=MIPS_MAGIC_LITTLE) &&\ - ((x).f_magic!=MIPS_MAGIC_BIG) && \ - ((x).f_magic!=MIPS_MAGIC_LITTLE2) && \ - ((x).f_magic!=MIPS_MAGIC_BIG2) && \ - ((x).f_magic!=MIPS_MAGIC_LITTLE3) && \ - ((x).f_magic!=MIPS_MAGIC_BIG3)) - -#define FILHDR struct external_filehdr -#define FILHSZ 20 - -/********************** AOUT "OPTIONAL HEADER" **********************/ - - -typedef struct external_aouthdr -{ - unsigned char magic[2]; /* type of file */ - unsigned char vstamp[2]; /* version stamp */ - unsigned char tsize[4]; /* text size in bytes, padded to FW bdry*/ - unsigned char dsize[4]; /* initialized data " " */ - unsigned char bsize[4]; /* uninitialized data " " */ - unsigned char entry[4]; /* entry pt. */ - unsigned char text_start[4]; /* base of text used for this file */ - unsigned char data_start[4]; /* base of data used for this file */ - unsigned char bss_start[4]; /* base of bss used for this file */ - unsigned char gprmask[4]; /* ?? */ - unsigned char cprmask[4][4]; /* ?? */ - unsigned char gp_value[4]; /* value for gp register */ -} AOUTHDR; - -/* compute size of a header */ - -#define AOUTSZ 56 -#define AOUTHDRSZ 56 - -/********************** SECTION HEADER **********************/ - -struct external_scnhdr { - unsigned char s_name[8]; /* section name */ - unsigned char s_paddr[4]; /* physical address, aliased s_nlib */ - unsigned char s_vaddr[4]; /* virtual address */ - unsigned char s_size[4]; /* section size */ - unsigned char s_scnptr[4]; /* file ptr to raw data for section */ - unsigned char s_relptr[4]; /* file ptr to relocation */ - unsigned char s_lnnoptr[4]; /* 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 40 - -/********************** RELOCATION DIRECTIVES **********************/ - -struct external_reloc { - unsigned char r_vaddr[4]; - 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 - -/* Originally, ECOFF used four bits for the reloc type and had three - reserved bits. Irix 4 added another bit for the reloc type, which - was easy because it was big endian and one of the spare bits became - the new most significant bit. To make this also work for little - endian ECOFF, we need to wrap one of the reserved bits around to - become the most significant bit of the reloc type. */ -#define RELOC_BITS3_TYPE_BIG 0x3E -#define RELOC_BITS3_TYPE_SH_BIG 1 -#define RELOC_BITS3_TYPE_LITTLE 0x78 -#define RELOC_BITS3_TYPE_SH_LITTLE 3 -#define RELOC_BITS3_TYPEHI_LITTLE 0x04 -#define RELOC_BITS3_TYPEHI_SH_LITTLE 2 - -#define RELOC_BITS3_EXTERN_BIG 0x01 -#define RELOC_BITS3_EXTERN_LITTLE 0x80 - -/* The r_type field in a reloc is one of the following values. I - don't know if any other values can appear. These seem to be all - that occur in the Ultrix 4.2 libraries. */ -#define MIPS_R_IGNORE 0 -#define MIPS_R_REFHALF 1 -#define MIPS_R_REFWORD 2 -#define MIPS_R_JMPADDR 3 -#define MIPS_R_REFHI 4 -#define MIPS_R_REFLO 5 -#define MIPS_R_GPREL 6 -#define MIPS_R_LITERAL 7 - -/* These reloc types are a Cygnus extension used when generating - position independent code for embedded systems. The numbers are - taken from Irix 4, but at least for internal relocs Irix 5 does not - give them the same meaning. For an internal reloc the symbol index - of RELHI and RELLO is modified as described below for - MIPS_R_SWITCH. */ -#define MIPS_R_PCREL16 12 -#define MIPS_R_RELHI 13 -#define MIPS_R_RELLO 14 - -/* This reloc type is a Cygnus extension used when generating position - independent code for embedded systems. It is used for an entry in - a switch table, which looks like this: - .word $L3-$LS12 - The object file will contain the correct difference, and does not - require adjustment. However, when the linker is relaxing PC - relative calls, it is possible for $L3 to move farther away. This - reloc always appears in the .text section, and is always against - the .text section. However, the symbol index is not - RELOC_SECTION_TEXT. It is, instead, the distance between this - switch table entry and $LS12. Thus, the original value of $L12 is - vaddr - symndx - and the original value of $L3 is - vaddr - symndx + addend - where addend is the value in the object file. Knowing this, the - linker can know whether the addend in the object file must be - adjusted. */ -#define MIPS_R_SWITCH 22 - -/********************** STABS **********************/ - -#define MIPS_IS_STAB ECOFF_IS_STAB -#define MIPS_MARK_STAB ECOFF_MARK_STAB -#define MIPS_UNMARK_STAB ECOFF_UNMARK_STAB - -/********************** 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]; -}; - -/* Runtime procedure table */ - -struct rpdr_ext { - unsigned char p_adr[4]; - unsigned char p_regmask[4]; - unsigned char p_regoffset[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_irpss[4]; - unsigned char p_reserved[4]; - unsigned char p_exception_info[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 Index: aux-coff.h =================================================================== --- aux-coff.h (revision 1765) +++ aux-coff.h (nonexistent) @@ -1,31 +0,0 @@ -/* Modifications of internal.h and m68k.h needed by A/UX - Suggested by Ian Lance Taylor */ - -#ifndef GNU_COFF_AUX_H -#define GNU_COFF_AUX_H 1 - -#include "coff/internal.h" -#include "coff/m68k.h" - -/* Section contains 64-byte padded pathnames of shared libraries */ -#undef STYP_LIB -#define STYP_LIB 0x200 - -/* Section contains shared library initialization code */ -#undef STYP_INIT -#define STYP_INIT 0x400 - -/* Section contains .ident information */ -#undef STYP_IDENT -#define STYP_IDENT 0x800 - -/* Section types used by bfd and gas not defined (directly) by A/UX */ -#undef STYP_OVER -#define STYP_OVER 0 -#undef STYP_INFO -#define STYP_INFO STYP_IDENT - -/* Traditional name of the section tagged with STYP_LIB */ -#define _LIB ".lib" - -#endif /* GNU_COFF_AUX_H */ Index: z8k.h =================================================================== --- z8k.h (revision 1765) +++ z8k.h (nonexistent) @@ -1,201 +0,0 @@ -/*** coff information for Zilog Z800N */ - -/********************** FILE HEADER **********************/ - -struct external_filehdr { - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ -}; - - -/* Type of cpu is stored in flags */ -#define F_Z8001 0x1000 -#define F_Z8002 0x2000 -#define F_MACHMASK 0xf000 - -#define Z8KMAGIC 0x8000 - -#define Z8KBADMAG(x) (((x).f_magic!=Z8KMAGIC)) - -#define FILHDR struct external_filehdr -#define FILHSZ 20 - - -/********************** AOUT "OPTIONAL HEADER" **********************/ - - -typedef struct -{ - char magic[2]; /* type of file */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ -} -AOUTHDR; - - -#define AOUTHDRSZ 28 -#define AOUTSZ 28 - - - - -/********************** SECTION HEADER **********************/ - - -struct external_scnhdr { - char s_name[8]; /* section name */ - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[2]; /* number of relocation entries */ - char s_nlnno[2]; /* number of line number entries*/ - char s_flags[4]; /* flags */ -}; - -/* - * names of "special" sections - */ -#define _TEXT ".text" -#define _DATA ".data" -#define _BSS ".bss" - - -#define SCNHDR struct external_scnhdr -#define SCNHSZ 40 - - -/********************** LINE NUMBERS **********************/ - -/* 1 line number entry for every "breakpointable" source line in a section. - * Line numbers are grouped on a per function basis; first entry in a function - * grouping will have l_lnno = 0 and in place of physical address will be the - * symbol table index of the function name. - */ -struct external_lineno { - union { - char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ - char l_paddr[4]; /* (physical) address of line number */ - } l_addr; - char l_lnno[4]; /* line number */ -}; - -#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno)); -#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno)); - -#define LINENO struct external_lineno -#define LINESZ 8 - - -/********************** SYMBOLS **********************/ - -#define E_SYMNMLEN 8 /* # characters in a symbol name */ -#define E_FILNMLEN 14 /* # characters in a file name */ -#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ - -struct external_syment -{ - union { - char e_name[E_SYMNMLEN]; - struct { - char e_zeroes[4]; - char e_offset[4]; - } e; - } e; - char e_value[4]; - char e_scnum[2]; - char e_type[2]; - char e_sclass[1]; - char e_numaux[1]; -}; - - - -#define N_BTMASK (017) -#define N_TMASK (060) -#define N_BTSHFT (4) -#define N_TSHIFT (2) - - -union external_auxent { - struct { - char x_tagndx[4]; /* str, un, or enum tag indx */ - union { - struct { - char x_lnno[2]; /* declaration line number */ - char x_size[2]; /* str/union/array size */ - } x_lnsz; - char x_fsize[4]; /* size of function */ - } x_misc; - union { - struct { /* if ISFCN, tag, or .bb */ - char x_lnnoptr[4]; /* ptr to fcn line # */ - char x_endndx[4]; /* entry ndx past block end */ - } x_fcn; - struct { /* if ISARY, up to 4 dimen. */ - char x_dimen[E_DIMNUM][2]; - } x_ary; - } x_fcnary; - char x_tvndx[2]; /* tv index */ - } x_sym; - - union { - char x_fname[E_FILNMLEN]; - struct { - char x_zeroes[4]; - char x_offset[4]; - } x_n; - } x_file; - - struct { - char x_scnlen[4]; /* section length */ - char x_nreloc[2]; /* # relocation entries */ - char x_nlinno[2]; /* # line numbers */ - } x_scn; - - struct { - char x_tvfill[4]; /* tv fill value */ - char x_tvlen[2]; /* length of .tv */ - char x_tvran[2][2]; /* tv range */ - } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ - - -}; - -#define SYMENT struct external_syment -#define SYMESZ 18 -#define AUXENT union external_auxent -#define AUXESZ 18 - - - -/********************** RELOCATION DIRECTIVES **********************/ - -/* The external reloc has an offset field, because some of the reloc - types on the z8k don't have room in the instruction for the entire - offset - eg with segments */ - -struct external_reloc { - char r_vaddr[4]; - char r_symndx[4]; - char r_offset[4]; - char r_type[2]; - char r_stuff[2]; -}; - - -#define RELOC struct external_reloc -#define RELSZ 16 - Index: ti.h =================================================================== --- ti.h (revision 1765) +++ ti.h (nonexistent) @@ -1,437 +0,0 @@ -/* COFF information for TI COFF support. Definitions in this file should be - customized in a target-specific file, and then this file included (see - tic54x.h for an example). */ -#ifndef COFF_TI_H -#define COFF_TI_H - -/********************** FILE HEADER **********************/ - -struct external_filehdr { - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ - char f_target_id[2]; /* magic no. (TI COFF-specific) */ -}; - -/* COFF0 has magic number in f_magic, and omits f_target_id from the file - header; for later versions, f_magic is 0xC1 for COFF1 and 0xC2 for COFF2 - and the target-specific magic number is found in f_target_id */ - -#define TICOFF0MAGIC TI_TARGET_ID -#define TICOFF1MAGIC 0x00C1 -#define TICOFF2MAGIC 0x00C2 -#define TICOFF_AOUT_MAGIC 0x0108 /* magic number in optional header */ -#define TICOFF 1 /* customize coffcode.h */ - -/* The target_id field changes depending on the particular CPU target */ -/* for COFF0, the target id appeared in f_magic, where COFFX magic is now */ -#ifndef TI_TARGET_ID -#error "TI_TARGET_ID needs to be defined for your CPU" -#endif - -/* Which bfd_arch to use... */ -#ifndef TICOFF_TARGET_ARCH -#error "TICOFF_TARGET_ARCH needs to be defined for your CPU" -#endif - -/* Default to COFF2 for file output */ -#ifndef TICOFF_DEFAULT_MAGIC -#define TICOFF_DEFAULT_MAGIC TICOFF2MAGIC -#endif - -/* This value is made available in the rare case where a bfd is unavailable */ -#ifndef OCTETS_PER_BYTE_POWER -#warn OCTETS_PER_BYTE_POWER not defined for this CPU, it will default to 0 -#else -#define OCTETS_PER_BYTE (1<>8)&0xF) - -#define COFF0_P(ABFD) (bfd_coff_filhsz(ABFD) == FILHSZ_V0) -#define COFF2_P(ABFD) (bfd_coff_scnhsz(ABFD) != SCNHSZ_V01) - -#define COFF0_BADMAG(x) ((x).f_magic != TICOFF0MAGIC) -#define COFF1_BADMAG(x) ((x).f_magic != TICOFF1MAGIC || (x).f_target_id != TI_TARGET_ID) -#define COFF2_BADMAG(x) ((x).f_magic != TICOFF2MAGIC || (x).f_target_id != TI_TARGET_ID) - -/* we need to read/write an extra field in the coff file header */ -#ifndef COFF_ADJUST_FILEHDR_IN_POST -#define COFF_ADJUST_FILEHDR_IN_POST(abfd,src,dst) \ -do { ((struct internal_filehdr *)(dst))->f_target_id = \ -bfd_h_get_16(abfd, (bfd_byte *)(((FILHDR *)(src))->f_target_id)); \ -((struct internal_filehdr *)(dst))->f_flags |= F_LDPAGE; \ -} while(0) -#endif - -#ifndef COFF_ADJUST_FILEHDR_OUT_POST -#define COFF_ADJUST_FILEHDR_OUT_POST(abfd,src,dst) \ -do { bfd_h_put_16(abfd, ((struct internal_filehdr *)(src))->f_target_id, \ - (bfd_byte *)(((FILHDR *)(dst))->f_target_id)); \ -} while(0) -#endif - -#define FILHDR struct external_filehdr -#define FILHSZ 22 -#define FILHSZ_V0 20 /* COFF0 omits target_id field */ - -/* File header flags */ -#define F_RELFLG (0x0001) -#define F_EXEC (0x0002) -#define F_LNNO (0x0004) -/* F_LSYMS needs to be redefined in your source file */ -#define F_LSYMS_TICOFF (0x0010) /* normal COFF is 0x8 */ - -#define F_10 0x00 /* file built for TMS320C1x devices */ -#define F_20 0x10 /* file built for TMS320C2x devices */ -#define F_25 0x20 /* file built for TMS320C2x/C5x devices */ -#define F_LENDIAN 0x0100 /* 16 bits/word, LSB first */ -#define F_SYMMERGE 0x1000 /* duplicate symbols were removed */ - -/********************** OPTIONAL HEADER **********************/ - - -typedef struct -{ - char magic[2]; /* type of file (0x108) */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ -} -AOUTHDR; - - -#define AOUTHDRSZ 28 -#define AOUTSZ 28 - - -/********************** SECTION HEADER **********************/ -/* COFF0, COFF1 */ -struct external_scnhdr_v01 { - char s_name[8]; /* section name */ - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size (in WORDS) */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[2]; /* number of relocation entries */ - char s_nlnno[2]; /* number of line number entries*/ - char s_flags[2]; /* flags */ - char s_reserved[1]; /* reserved */ - char s_page[1]; /* section page number (LOAD) */ -}; - -/* COFF2 */ -struct external_scnhdr { - char s_name[8]; /* section name */ - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size (in WORDS) */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[4]; /* number of relocation entries */ - char s_nlnno[4]; /* number of line number entries*/ - char s_flags[4]; /* flags */ - char s_reserved[2]; /* reserved */ - char s_page[2]; /* section page number (LOAD) */ -}; - -/* - * Special section flags - */ -/* recognized load pages */ -#define PG_PROG 0x0 /* PROG page */ -#define PG_DATA 0x1 /* DATA page */ - -/* TI COFF defines these flags; - STYP_CLINK: the section should be excluded from the final - linker output if there are no references found to any symbol in the section - STYP_BLOCK: the section should be blocked, i.e. if the section would cross - a page boundary, it is started at a page boundary instead. - TI COFF puts the section alignment power of two in the section flags - e.g. 2**N is alignment, flags |= (N & 0xF) << 8 -*/ -#define STYP_CLINK (0x4000) -#define STYP_BLOCK (0x1000) -#define STYP_ALIGN (0x0F00) /* TI COFF stores section alignment here */ - -#define SCNHDR_V01 struct external_scnhdr_v01 -#define SCNHDR struct external_scnhdr -#define SCNHSZ_V01 40 /* for v0 and v1 */ -#define SCNHSZ 48 - -/* COFF2 changes the offsets and sizes of these fields - Assume we're dealing with the COFF2 scnhdr structure, and adjust - accordingly - */ -#define GET_SCNHDR_NRELOC(ABFD,PTR) \ -(COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, PTR)) -#define PUT_SCNHDR_NRELOC(ABFD,VAL,PTR) \ -(COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,PTR)) -#define GET_SCNHDR_NLNNO(ABFD,PTR) \ -(COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, (PTR)-2)) -#define PUT_SCNHDR_NLNNO(ABFD,VAL,PTR) \ -(COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,(PTR)-2)) -#define GET_SCNHDR_FLAGS(ABFD,PTR) \ -(COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, (PTR)-4)) -#define PUT_SCNHDR_FLAGS(ABFD,VAL,PTR) \ -(COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,(PTR)-4)) -#define GET_SCNHDR_PAGE(ABFD,PTR) \ -(COFF2_P(ABFD) ? bfd_h_get_16 (ABFD,PTR) : bfd_h_get_8 (ABFD, (PTR)-7)) -/* on output, make sure that the "reserved" field is zero */ -#define PUT_SCNHDR_PAGE(ABFD,VAL,PTR) \ -(COFF2_P(ABFD) ? bfd_h_put_16 (ABFD,VAL,PTR) : \ -bfd_h_put_8 (ABFD,VAL,(PTR)-7), bfd_h_put_8 (ABFD, 0, (PTR)-8)) - -/* TI COFF stores section size as number of bytes (address units, not octets), - so adjust to be number of octets, which is what BFD expects */ -#define GET_SCNHDR_SIZE(ABFD,SZP) \ -(bfd_h_get_32(ABFD,SZP)*bfd_octets_per_byte(ABFD)) -#define PUT_SCNHDR_SIZE(ABFD,SZ,SZP) \ -bfd_h_put_32(ABFD,(SZ)/bfd_octets_per_byte(ABFD),SZP) - -#define COFF_ADJUST_SCNHDR_IN_POST(ABFD,EXT,INT) \ -do { ((struct internal_scnhdr *)(INT))->s_page = \ -GET_SCNHDR_PAGE(ABFD,(bfd_byte *)((SCNHDR *)(EXT))->s_page); \ -} while(0) - -/* The line number and reloc overflow checking in coff_swap_scnhdr_out in - coffswap.h doesn't use PUT_X for s_nlnno and s_nreloc. - Due to different sized v0/v1/v2 section headers, we have to re-write these - fields. - */ -#define COFF_ADJUST_SCNHDR_OUT_POST(ABFD,INT,EXT) \ -do { \ -PUT_SCNHDR_NLNNO(ABFD,((struct internal_scnhdr *)(INT))->s_nlnno,\ - (bfd_byte *)((SCNHDR *)(EXT))->s_nlnno); \ -PUT_SCNHDR_NRELOC(ABFD,((struct internal_scnhdr *)(INT))->s_nreloc,\ - (bfd_byte *)((SCNHDR *)(EXT))->s_nreloc); \ -PUT_SCNHDR_FLAGS(ABFD,((struct internal_scnhdr *)(INT))->s_flags, \ - (bfd_byte *)((SCNHDR *)(EXT))->s_flags); \ -PUT_SCNHDR_PAGE(ABFD,((struct internal_scnhdr *)(INT))->s_page, \ - (bfd_byte *)((SCNHDR *)(EXT))->s_page); \ -} while(0) - -/* page macros - - the first GDB port requires flags in its remote memory access commands to - distinguish between data/prog space. hopefully we can make this go away - eventually. stuff the page in the upper bits of a 32-bit address, since - the c5x family only uses 16 or 23 bits. - - c2x, c5x and most c54x devices have 16-bit addresses, but the c548 has - 23-bit program addresses. make sure the page flags don't interfere - These flags are used by GDB to identify the destination page for - addresses. -*/ - -#define LONG_ADDRESSES 1 -#define PG_SHIFT (LONG_ADDRESSES ? 30 : 16) -#define ADDR_MASK ((1ul<>PG_SHIFT) - -/* - * names of "special" sections - */ -#define _TEXT ".text" -#define _DATA ".data" -#define _BSS ".bss" -#define _CINIT ".cinit" /* initialized C data */ -#define _SCONST ".const" /* constants */ -#define _SWITCH ".switch" /* switch tables */ -#define _STACK ".stack" /* C stack */ -#define _SYSMEM ".sysmem" /* used for malloc et al. syscalls */ - -/********************** LINE NUMBERS **********************/ - -/* 1 line number entry for every "breakpointable" source line in a section. - * Line numbers are grouped on a per function basis; first entry in a function - * grouping will have l_lnno = 0 and in place of physical address will be the - * symbol table index of the function name. - */ -struct external_lineno { - union { - char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ - char l_paddr[4]; /* (physical) address of line number */ - } l_addr; - char l_lnno[2]; /* line number */ -}; - -#define LINENO struct external_lineno -#define LINESZ 6 - - -/********************** SYMBOLS **********************/ - -/* NOTE: this is what a local label looks like in assembly source; what it - looks like in COFF output is undefined */ -#define TICOFF_LOCAL_LABEL_P(NAME) \ -((NAME[0] == '$' && NAME[1] >= '0' && NAME[1] <= '9' && NAME[2] == '\0') \ - || NAME[strlen(NAME)-1] == '?') - -#define E_SYMNMLEN 8 /* # characters in a symbol name */ -#define E_FILNMLEN 14 /* # characters in a file name */ -#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ - -struct external_syment -{ - union { - char e_name[E_SYMNMLEN]; - struct { - char e_zeroes[4]; - char e_offset[4]; - } e; - } e; - char e_value[4]; - char e_scnum[2]; - char e_type[2]; - char e_sclass[1]; - char e_numaux[1]; -}; - - -#define N_BTMASK (017) -#define N_TMASK (060) -#define N_BTSHFT (4) -#define N_TSHIFT (2) - - -union external_auxent { - struct { - char x_tagndx[4]; /* str, un, or enum tag indx */ - union { - struct { - char x_lnno[2]; /* declaration line number */ - char x_size[2]; /* str/union/array size */ - } x_lnsz; - char x_fsize[4]; /* size of function */ - } x_misc; - union { - struct { /* if ISFCN, tag, or .bb */ - char x_lnnoptr[4]; /* ptr to fcn line # */ - char x_endndx[4]; /* entry ndx past block end */ - } x_fcn; - struct { /* if ISARY, up to 4 dimen. */ - char x_dimen[E_DIMNUM][2]; - } x_ary; - } x_fcnary; - char x_tvndx[2]; /* tv index */ - } x_sym; - - union { - char x_fname[E_FILNMLEN]; - struct { - char x_zeroes[4]; - char x_offset[4]; - } x_n; - } x_file; - - struct { - char x_scnlen[4]; /* section length */ - char x_nreloc[2]; /* # relocation entries */ - char x_nlinno[2]; /* # line numbers */ - } x_scn; - - struct { - char x_tvfill[4]; /* tv fill value */ - char x_tvlen[2]; /* length of .tv */ - char x_tvran[2][2]; /* tv range */ - } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ - - -}; - -#define SYMENT struct external_syment -#define SYMESZ 18 -#define AUXENT union external_auxent -#define AUXESZ 18 - -/* section lengths are in target bytes (not host bytes) */ -#define GET_SCN_SCNLEN(ABFD,EXT) \ -(bfd_h_get_32(ABFD,(bfd_byte *)(EXT)->x_scn.x_scnlen)*bfd_octets_per_byte(ABFD)) -#define PUT_SCN_SCNLEN(ABFD,INT,EXT) \ -bfd_h_put_32(ABFD,(INT)/bfd_octets_per_byte(ABFD),\ - (bfd_byte *)(EXT)->x_scn.x_scnlen) - -/* lnsz size is in bits in COFF file, in bytes in BFD */ -#define GET_LNSZ_SIZE(abfd, ext) \ -(bfd_h_get_16(abfd, (bfd_byte *)ext->x_sym.x_misc.x_lnsz.x_size) / \ - (class != C_FIELD ? 8 : 1)) - -#define PUT_LNSZ_SIZE(abfd, in, ext) \ - bfd_h_put_16(abfd, ((class != C_FIELD) ? (in)*8 : (in)), \ - (bfd_byte*) ext->x_sym.x_misc.x_lnsz.x_size) - -/* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes */ -#define COFF_ADJUST_SYM_IN_POST(ABFD,EXT,INT) \ -do { struct internal_syment *dst = (struct internal_syment *)(INT); \ -if (dst->n_sclass == C_MOS || dst->n_sclass == C_MOU) dst->n_value /= 8; \ -} while (0) - -#define COFF_ADJUST_SYM_OUT_POST(ABFD,INT,EXT) \ -do { struct internal_syment *src = (struct internal_syment *)(INT); \ -SYMENT *dst = (SYMENT *)(EXT); \ -if(src->n_sclass == C_MOU || src->n_sclass == C_MOS) \ -bfd_h_put_32(abfd,src->n_value * 8,(bfd_byte *)dst->e_value); \ -} while (0) - -/* Detect section-relative absolute symbols so they get flagged with a sym - index of -1. -*/ -#define SECTION_RELATIVE_ABSOLUTE_SYMBOL_P(RELOC,SECT) \ -((*(RELOC)->sym_ptr_ptr)->section->output_section == (SECT) \ - && (RELOC)->howto->name[0] == 'A') - -/********************** RELOCATION DIRECTIVES **********************/ - -struct external_reloc_v0 { - char r_vaddr[4]; - char r_symndx[2]; - char r_reserved[2]; - char r_type[2]; -}; - -struct external_reloc { - char r_vaddr[4]; - char r_symndx[4]; - char r_reserved[2]; /* extended pmad byte for COFF2 */ - char r_type[2]; -}; - -#define RELOC struct external_reloc -#define RELSZ_V0 10 /* FIXME -- coffcode.h needs fixing */ -#define RELSZ 12 /* for COFF1/2 */ - -/* various relocation types. */ -#define R_ABS 0x0000 /* no relocation */ -#define R_REL13 0x002A /* 13-bit direct reference (???) */ -#define R_PARTLS7 0x0028 /* 7 LSBs of an address */ -#define R_PARTMS9 0x0029 /* 9MSBs of an address */ -#define R_EXTWORD 0x002B /* 23-bit direct reference */ -#define R_EXTWORD16 0x002C /* 16-bit direct reference to 23-bit addr*/ -#define R_EXTWORDMS7 0x002D /* upper 7 bits of 23-bit address */ - -#endif /* COFF_TI_H */ Index: go32exe.h =================================================================== --- go32exe.h (revision 1765) +++ go32exe.h (nonexistent) @@ -1,20 +0,0 @@ -/* COFF information for PC running go32. */ - -#define STUBSIZE 2048 - -struct external_filehdr_go32_exe { - char stub[STUBSIZE]; /* the stub to load the image */ - /* the standard COFF header */ - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ -}; - -#undef FILHDR -#define FILHDR struct external_filehdr_go32_exe -#undef FILHSZ -#define FILHSZ STUBSIZE+20 Index: internal.h =================================================================== --- internal.h (revision 1765) +++ internal.h (nonexistent) @@ -1,728 +0,0 @@ -/* Internal format of COFF object file data structures, for GNU BFD. - This file is part of BFD, the Binary File Descriptor library. */ - -#ifndef GNU_COFF_INTERNAL_H -#define GNU_COFF_INTERNAL_H 1 - -/* First, make "signed char" work, even on old compilers. */ -#ifndef signed -#ifndef __STDC__ -#define signed /**/ -#endif -#endif - -/********************** FILE HEADER **********************/ - -/* extra stuff in a PE header. */ - -struct internal_extra_pe_filehdr -{ - /* DOS header data follows for PE stuff */ - unsigned short e_magic; /* Magic number, 0x5a4d */ - unsigned short e_cblp; /* Bytes on last page of file, 0x90 */ - unsigned short e_cp; /* Pages in file, 0x3 */ - unsigned short e_crlc; /* Relocations, 0x0 */ - unsigned short e_cparhdr; /* Size of header in paragraphs, 0x4 */ - unsigned short e_minalloc; /* Minimum extra paragraphs needed, 0x0 */ - unsigned short e_maxalloc; /* Maximum extra paragraphs needed, 0xFFFF */ - unsigned short e_ss; /* Initial (relative) SS value, 0x0 */ - unsigned short e_sp; /* Initial SP value, 0xb8 */ - unsigned short e_csum; /* Checksum, 0x0 */ - unsigned short e_ip; /* Initial IP value, 0x0 */ - unsigned short e_cs; /* Initial (relative) CS value, 0x0 */ - unsigned short e_lfarlc; /* File address of relocation table, 0x40 */ - unsigned short e_ovno; /* Overlay number, 0x0 */ - unsigned short e_res[4]; /* Reserved words, all 0x0 */ - unsigned short e_oemid; /* OEM identifier (for e_oeminfo), 0x0 */ - unsigned short e_oeminfo; /* OEM information; e_oemid specific, 0x0 */ - unsigned short e_res2[10]; /* Reserved words, all 0x0 */ - bfd_vma e_lfanew; /* File address of new exe header, 0x80 */ - unsigned long dos_message[16]; /* text which always follows dos header */ - bfd_vma nt_signature; /* required NT signature, 0x4550 */ -}; - -struct internal_filehdr -{ - struct internal_extra_pe_filehdr pe; - - /* standard coff internal info */ - unsigned short f_magic; /* magic number */ - unsigned short f_nscns; /* number of sections */ - long f_timdat; /* time & date stamp */ - bfd_vma f_symptr; /* file pointer to symtab */ - long f_nsyms; /* number of symtab entries */ - unsigned short f_opthdr; /* sizeof(optional hdr) */ - unsigned short f_flags; /* flags */ - unsigned short f_target_id; /* (TI COFF specific) */ -}; - - -/* Bits for f_flags: - * F_RELFLG relocation info stripped from file - * F_EXEC file is executable (no unresolved external references) - * F_LNNO line numbers stripped from file - * F_LSYMS local symbols stripped from file - * F_AR16WR file is 16-bit little-endian - * F_AR32WR file is 32-bit little-endian - * F_AR32W file is 32-bit big-endian - * F_DYNLOAD rs/6000 aix: dynamically loadable w/imports & exports - * F_SHROBJ rs/6000 aix: file is a shared object - * F_DLL PE format DLL - */ - -#define F_RELFLG (0x0001) -#define F_EXEC (0x0002) -#define F_LNNO (0x0004) -#define F_LSYMS (0x0008) -#define F_AR16WR (0x0080) -#define F_AR32WR (0x0100) -#define F_AR32W (0x0200) -#define F_DYNLOAD (0x1000) -#define F_SHROBJ (0x2000) -#define F_DLL (0x2000) - -/* extra structure which is used in the optional header */ -typedef struct _IMAGE_DATA_DIRECTORY -{ - bfd_vma VirtualAddress; - long Size; -} IMAGE_DATA_DIRECTORY; -#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16 - -/* Default image base for NT. */ -#define NT_EXE_IMAGE_BASE 0x400000 -#define NT_DLL_IMAGE_BASE 0x10000000 - -/* Default image base for BeOS. */ -#define BEOS_EXE_IMAGE_BASE 0x80000000 -#define BEOS_DLL_IMAGE_BASE 0x10000000 - -/* Extra stuff in a PE aouthdr */ - -#define PE_DEF_SECTION_ALIGNMENT 0x1000 -#define PE_DEF_FILE_ALIGNMENT 0x200 - -struct internal_extra_pe_aouthdr -{ - /* PE stuff */ - bfd_vma ImageBase; /* address of specific location in memory that - file is located, NT default 0x10000 */ - - bfd_vma SectionAlignment; /* section alignment default 0x1000 */ - bfd_vma FileAlignment; /* file alignment default 0x200 */ - short MajorOperatingSystemVersion; /* minimum version of the operating */ - short MinorOperatingSystemVersion; /* system req'd for exe, default to 1*/ - short MajorImageVersion; /* user defineable field to store version of */ - short MinorImageVersion; /* exe or dll being created, default to 0 */ - short MajorSubsystemVersion; /* minimum subsystem version required to */ - short MinorSubsystemVersion; /* run exe; default to 3.1 */ - long Reserved1; /* seems to be 0 */ - long SizeOfImage; /* size of memory to allocate for prog */ - long SizeOfHeaders; /* size of PE header and section table */ - long CheckSum; /* set to 0 */ - short Subsystem; - - /* type of subsystem exe uses for user interface, - possible values: - 1 - NATIVE Doesn't require a subsystem - 2 - WINDOWS_GUI runs in Windows GUI subsystem - 3 - WINDOWS_CUI runs in Windows char sub. (console app) - 5 - OS2_CUI runs in OS/2 character subsystem - 7 - POSIX_CUI runs in Posix character subsystem */ - short DllCharacteristics; /* flags for DLL init, use 0 */ - bfd_vma SizeOfStackReserve; /* amount of memory to reserve */ - bfd_vma SizeOfStackCommit; /* amount of memory initially committed for - initial thread's stack, default is 0x1000 */ - bfd_vma SizeOfHeapReserve; /* amount of virtual memory to reserve and */ - bfd_vma SizeOfHeapCommit; /* commit, don't know what to defaut it to */ - long LoaderFlags; /* can probably set to 0 */ - long NumberOfRvaAndSizes; /* number of entries in next entry, 16 */ - IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; -}; - -/********************** AOUT "OPTIONAL HEADER" **********************/ -struct internal_aouthdr -{ - short magic; /* type of file */ - short vstamp; /* version stamp */ - bfd_vma tsize; /* text size in bytes, padded to FW bdry*/ - bfd_vma dsize; /* initialized data " " */ - bfd_vma bsize; /* uninitialized data " " */ - bfd_vma entry; /* entry pt. */ - bfd_vma text_start; /* base of text used for this file */ - bfd_vma data_start; /* base of data used for this file */ - - /* i960 stuff */ - unsigned long tagentries; /* number of tag entries to follow */ - - /* RS/6000 stuff */ - unsigned long o_toc; /* address of TOC */ - short o_snentry; /* section number for entry point */ - short o_sntext; /* section number for text */ - short o_sndata; /* section number for data */ - short o_sntoc; /* section number for toc */ - short o_snloader; /* section number for loader section */ - short o_snbss; /* section number for bss */ - short o_algntext; /* max alignment for text */ - short o_algndata; /* max alignment for data */ - short o_modtype; /* Module type field, 1R,RE,RO */ - short o_cputype; /* Encoded CPU type */ - unsigned long o_maxstack; /* max stack size allowed. */ - unsigned long o_maxdata; /* max data size allowed. */ - - /* ECOFF stuff */ - bfd_vma bss_start; /* Base of bss section. */ - bfd_vma gp_value; /* GP register value. */ - unsigned long gprmask; /* General registers used. */ - unsigned long cprmask[4]; /* Coprocessor registers used. */ - unsigned long fprmask; /* Floating pointer registers used. */ - - /* Apollo stuff */ - long o_inlib; /* inlib data */ - long o_sri; /* Static Resource Information */ - long vid[2]; /* Version id */ - - - struct internal_extra_pe_aouthdr pe; - -}; - -/********************** STORAGE CLASSES **********************/ - -/* This used to be defined as -1, but now n_sclass is unsigned. */ -#define C_EFCN 0xff /* physical end of function */ -#define C_NULL 0 -#define C_AUTO 1 /* automatic variable */ -#define C_EXT 2 /* external symbol */ -#define C_STAT 3 /* static */ -#define C_REG 4 /* register variable */ -#define C_EXTDEF 5 /* external definition */ -#define C_LABEL 6 /* label */ -#define C_ULABEL 7 /* undefined label */ -#define C_MOS 8 /* member of structure */ -#define C_ARG 9 /* function argument */ -#define C_STRTAG 10 /* structure tag */ -#define C_MOU 11 /* member of union */ -#define C_UNTAG 12 /* union tag */ -#define C_TPDEF 13 /* type definition */ -#define C_USTATIC 14 /* undefined static */ -#define C_ENTAG 15 /* enumeration tag */ -#define C_MOE 16 /* member of enumeration */ -#define C_REGPARM 17 /* register parameter */ -#define C_FIELD 18 /* bit field */ -#define C_AUTOARG 19 /* auto argument */ -#define C_LASTENT 20 /* dummy entry (end of block) */ -#define C_BLOCK 100 /* ".bb" or ".eb" */ -#define C_FCN 101 /* ".bf" or ".ef" */ -#define C_EOS 102 /* end of structure */ -#define C_FILE 103 /* file name */ -#define C_LINE 104 /* line # reformatted as symbol table entry */ -#define C_ALIAS 105 /* duplicate tag */ -#define C_HIDDEN 106 /* ext symbol in dmert public lib */ - -#define C_WEAKEXT 127 /* weak symbol -- GNU extension */ - -/* New storage classes for TI COFF */ -#define C_UEXT 19 /* Tentative external definition */ -#define C_STATLAB 20 /* Static load time label */ -#define C_EXTLAB 21 /* External load time label */ -#define C_SYSTEM 23 /* System Wide variable */ - -/* New storage classes for WINDOWS_NT */ -#define C_SECTION 104 /* section name */ -#define C_NT_WEAK 105 /* weak external */ - - /* New storage classes for 80960 */ - -/* C_LEAFPROC is obsolete. Use C_LEAFEXT or C_LEAFSTAT */ -#define C_LEAFPROC 108 /* Leaf procedure, "call" via BAL */ - -#define C_SCALL 107 /* Procedure reachable via system call */ -#define C_LEAFEXT 108 /* External leaf */ -#define C_LEAFSTAT 113 /* Static leaf */ -#define C_OPTVAR 109 /* Optimized variable */ -#define C_DEFINE 110 /* Preprocessor #define */ -#define C_PRAGMA 111 /* Advice to compiler or linker */ -#define C_SEGMENT 112 /* 80960 segment name */ - - /* Storage classes for m88k */ -#define C_SHADOW 107 /* shadow symbol */ -#define C_VERSION 108 /* coff version symbol */ - - /* New storage classes for RS/6000 */ -#define C_HIDEXT 107 /* Un-named external symbol */ -#define C_BINCL 108 /* Marks beginning of include file */ -#define C_EINCL 109 /* Marks ending of include file */ - - /* storage classes for stab symbols for RS/6000 */ -#define C_GSYM (0x80) -#define C_LSYM (0x81) -#define C_PSYM (0x82) -#define C_RSYM (0x83) -#define C_RPSYM (0x84) -#define C_STSYM (0x85) -#define C_TCSYM (0x86) -#define C_BCOMM (0x87) -#define C_ECOML (0x88) -#define C_ECOMM (0x89) -#define C_DECL (0x8c) -#define C_ENTRY (0x8d) -#define C_FUN (0x8e) -#define C_BSTAT (0x8f) -#define C_ESTAT (0x90) - -/* Storage classes for Thumb symbols */ -#define C_THUMBEXT (128 + C_EXT) /* 130 */ -#define C_THUMBSTAT (128 + C_STAT) /* 131 */ -#define C_THUMBLABEL (128 + C_LABEL) /* 134 */ -#define C_THUMBEXTFUNC (C_THUMBEXT + 20) /* 150 */ -#define C_THUMBSTATFUNC (C_THUMBSTAT + 20) /* 151 */ - -/********************** SECTION HEADER **********************/ - -#define SCNNMLEN (8) - -struct internal_scnhdr -{ - char s_name[SCNNMLEN]; /* section name */ - - /* Physical address, aliased s_nlib. - In the pei format, this field is the virtual section size - (the size of the section after being loaded int memory), - NOT the physical address. */ - bfd_vma s_paddr; - - bfd_vma s_vaddr; /* virtual address */ - bfd_vma s_size; /* section size */ - bfd_vma s_scnptr; /* file ptr to raw data for section */ - bfd_vma s_relptr; /* file ptr to relocation */ - bfd_vma s_lnnoptr; /* file ptr to line numbers */ - unsigned long s_nreloc; /* number of relocation entries */ - unsigned long s_nlnno; /* number of line number entries*/ - long s_flags; /* flags */ - long s_align; /* used on I960 */ -}; - -/* - * s_flags "type" - */ -#define STYP_REG (0x0000) /* "regular": allocated, relocated, loaded */ -#define STYP_DSECT (0x0001) /* "dummy": relocated only*/ -#define STYP_NOLOAD (0x0002) /* "noload": allocated, relocated, not loaded */ -#define STYP_GROUP (0x0004) /* "grouped": formed of input sections */ -#define STYP_PAD (0x0008) /* "padding": not allocated, not relocated, loaded */ -#define STYP_COPY (0x0010) /* "copy": for decision function used by field update; not allocated, not relocated, - loaded; reloc & lineno entries processed normally */ -#define STYP_TEXT (0x0020) /* section contains text only */ -#define S_SHRSEG (0x0020) /* In 3b Update files (output of ogen), sections which appear in SHARED segments of the Pfile - will have the S_SHRSEG flag set by ogen, to inform dufr that updating 1 copy of the proc. will - update all process invocations. */ -#define STYP_DATA (0x0040) /* section contains data only */ -#define STYP_BSS (0x0080) /* section contains bss only */ -#define S_NEWFCN (0x0100) /* In a minimal file or an update file, a new function (as compared with a replaced function) */ -#define STYP_INFO (0x0200) /* comment: not allocated not relocated, not loaded */ -#define STYP_OVER (0x0400) /* overlay: relocated not allocated or loaded */ -#define STYP_LIB (0x0800) /* for .lib: same as INFO */ -#define STYP_MERGE (0x2000) /* merge section -- combines with text, data or bss sections only */ -#define STYP_REVERSE_PAD (0x4000) /* section will be padded with no-op instructions wherever padding is necessary and there is a - - word of contiguous bytes - beginning on a word boundary. */ - -#define STYP_LIT 0x8020 /* Literal data (like STYP_TEXT) */ - - - -/********************** LINE NUMBERS **********************/ - -/* 1 line number entry for every "breakpointable" source line in a section. - * Line numbers are grouped on a per function basis; first entry in a function - * grouping will have l_lnno = 0 and in place of physical address will be the - * symbol table index of the function name. - */ - -struct internal_lineno -{ - union - { - long l_symndx; /* function name symbol index, iff l_lnno == 0*/ - long l_paddr; /* (physical) address of line number */ - } l_addr; - unsigned long l_lnno; /* line number */ -}; - -/********************** SYMBOLS **********************/ - -#define SYMNMLEN 8 /* # characters in a symbol name */ -#define FILNMLEN 14 /* # characters in a file name */ -#define DIMNUM 4 /* # array dimensions in auxiliary entry */ - -struct internal_syment -{ - union - { - char _n_name[SYMNMLEN]; /* old COFF version */ - struct - { - long _n_zeroes; /* new == 0 */ - long _n_offset; /* offset into string table */ - } _n_n; - char *_n_nptr[2]; /* allows for overlaying */ - } _n; - long n_value; /* value of symbol */ - short n_scnum; /* section number */ - unsigned short n_flags; /* copy of flags from filhdr */ - unsigned short n_type; /* type and derived type */ - unsigned char n_sclass; /* storage class */ - unsigned char n_numaux; /* number of aux. entries */ -}; - -#define n_name _n._n_name -#define n_zeroes _n._n_n._n_zeroes -#define n_offset _n._n_n._n_offset - - -/* Relocatable symbols have number of the section in which they are defined, - or one of the following: */ - -#define N_UNDEF ((short)0) /* undefined symbol */ -#define N_ABS ((short)-1) /* value of symbol is absolute */ -#define N_DEBUG ((short)-2) /* debugging symbol -- value is meaningless */ -#define N_TV ((short)-3) /* indicates symbol needs preload transfer vector */ -#define P_TV ((short)-4) /* indicates symbol needs postload transfer vector*/ - -/* - * Type of a symbol, in low N bits of the word - */ -#define T_NULL 0 -#define T_VOID 1 /* function argument (only used by compiler) */ -#define T_CHAR 2 /* character */ -#define T_SHORT 3 /* short integer */ -#define T_INT 4 /* integer */ -#define T_LONG 5 /* long integer */ -#define T_FLOAT 6 /* floating point */ -#define T_DOUBLE 7 /* double word */ -#define T_STRUCT 8 /* structure */ -#define T_UNION 9 /* union */ -#define T_ENUM 10 /* enumeration */ -#define T_MOE 11 /* member of enumeration*/ -#define T_UCHAR 12 /* unsigned character */ -#define T_USHORT 13 /* unsigned short */ -#define T_UINT 14 /* unsigned integer */ -#define T_ULONG 15 /* unsigned long */ -#define T_LNGDBL 16 /* long double */ - -/* - * derived types, in n_type -*/ -#define DT_NON (0) /* no derived type */ -#define DT_PTR (1) /* pointer */ -#define DT_FCN (2) /* function */ -#define DT_ARY (3) /* array */ - -#define BTYPE(x) ((x) & N_BTMASK) -#define DTYPE(x) (((x) & N_TMASK) >> N_BTSHFT) - -#define ISPTR(x) \ - (((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_PTR << N_BTSHFT)) -#define ISFCN(x) \ - (((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_FCN << N_BTSHFT)) -#define ISARY(x) \ - (((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_ARY << N_BTSHFT)) -#define ISTAG(x) \ - ((x) == C_STRTAG || (x) == C_UNTAG || (x) == C_ENTAG) -#define DECREF(x) \ - ((((x) >> N_TSHIFT) & ~ N_BTMASK) | ((x) & N_BTMASK)) - -union internal_auxent -{ - struct - { - - union - { - long l; /* str, un, or enum tag indx */ - struct coff_ptr_struct *p; - } x_tagndx; - - union - { - struct - { - unsigned short x_lnno; /* declaration line number */ - unsigned short x_size; /* str/union/array size */ - } x_lnsz; - long x_fsize; /* size of function */ - } x_misc; - - union - { - struct - { /* if ISFCN, tag, or .bb */ - long x_lnnoptr; /* ptr to fcn line # */ - union - { /* entry ndx past block end */ - long l; - struct coff_ptr_struct *p; - } x_endndx; - } x_fcn; - - struct - { /* if ISARY, up to 4 dimen. */ - unsigned short x_dimen[DIMNUM]; - } x_ary; - } x_fcnary; - - unsigned short x_tvndx; /* tv index */ - } x_sym; - - union - { - char x_fname[FILNMLEN]; - struct - { - long x_zeroes; - long x_offset; - } x_n; - } x_file; - - struct - { - long x_scnlen; /* section length */ - unsigned short x_nreloc; /* # relocation entries */ - unsigned short x_nlinno; /* # line numbers */ - unsigned long x_checksum; /* section COMDAT checksum for PE */ - unsigned short x_associated; /* COMDAT associated section index for PE */ - unsigned char x_comdat; /* COMDAT selection number for PE */ - } x_scn; - - struct - { - long x_tvfill; /* tv fill value */ - unsigned short x_tvlen; /* length of .tv */ - unsigned short x_tvran[2]; /* tv range */ - } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ - - /****************************************** - * RS/6000-specific auxent - last auxent for every external symbol - ******************************************/ - struct - { - union - { /* csect length or enclosing csect */ - long l; - struct coff_ptr_struct *p; - } x_scnlen; - long x_parmhash; /* parm type hash index */ - unsigned short x_snhash; /* sect num with parm hash */ - unsigned char x_smtyp; /* symbol align and type */ - /* 0-4 - Log 2 of alignment */ - /* 5-7 - symbol type */ - unsigned char x_smclas; /* storage mapping class */ - long x_stab; /* dbx stab info index */ - unsigned short x_snstab; /* sect num with dbx stab */ - } x_csect; /* csect definition information */ - -/* x_smtyp values: */ - -#define SMTYP_ALIGN(x) ((x) >> 3) /* log2 of alignment */ -#define SMTYP_SMTYP(x) ((x) & 0x7) /* symbol type */ -/* Symbol type values: */ -#define XTY_ER 0 /* External reference */ -#define XTY_SD 1 /* Csect definition */ -#define XTY_LD 2 /* Label definition */ -#define XTY_CM 3 /* .BSS */ -#define XTY_EM 4 /* Error message */ -#define XTY_US 5 /* "Reserved for internal use" */ - -/* x_smclas values: */ - -#define XMC_PR 0 /* Read-only program code */ -#define XMC_RO 1 /* Read-only constant */ -#define XMC_DB 2 /* Read-only debug dictionary table */ -#define XMC_TC 3 /* Read-write general TOC entry */ -#define XMC_UA 4 /* Read-write unclassified */ -#define XMC_RW 5 /* Read-write data */ -#define XMC_GL 6 /* Read-only global linkage */ -#define XMC_XO 7 /* Read-only extended operation */ -#define XMC_SV 8 /* Read-only supervisor call */ -#define XMC_BS 9 /* Read-write BSS */ -#define XMC_DS 10 /* Read-write descriptor csect */ -#define XMC_UC 11 /* Read-write unnamed Fortran common */ -#define XMC_TI 12 /* Read-only traceback index csect */ -#define XMC_TB 13 /* Read-only traceback table csect */ -/* 14 ??? */ -#define XMC_TC0 15 /* Read-write TOC anchor */ -#define XMC_TD 16 /* Read-write data in TOC */ - - /****************************************** - * I960-specific *2nd* aux. entry formats - ******************************************/ - struct - { - /* This is a very old typo that keeps getting propagated. */ -#define x_stdindx x_stindx - long x_stindx; /* sys. table entry */ - } x_sc; /* system call entry */ - - struct - { - unsigned long x_balntry; /* BAL entry point */ - } x_bal; /* BAL-callable function */ - - struct - { - unsigned long x_timestamp; /* time stamp */ - char x_idstring[20]; /* producer identity string */ - } x_ident; /* Producer ident info */ - -}; - -/********************** RELOCATION DIRECTIVES **********************/ - -struct internal_reloc -{ - bfd_vma r_vaddr; /* Virtual address of reference */ - long r_symndx; /* Index into symbol table */ - unsigned short r_type; /* Relocation type */ - unsigned char r_size; /* Used by RS/6000 and ECOFF */ - unsigned char r_extern; /* Used by ECOFF */ - unsigned long r_offset; /* Used by Alpha ECOFF, SPARC, others */ -}; - -#define R_DIR16 1 -#define R_DIR32 6 -#define R_IMAGEBASE 7 -#define R_RELBYTE 15 -#define R_RELWORD 16 -#define R_RELLONG 17 -#define R_PCRBYTE 18 -#define R_PCRWORD 19 -#define R_PCRLONG 20 -#define R_IPRSHORT 24 -#define R_IPRLONG 26 -#define R_GETSEG 29 -#define R_GETPA 30 -#define R_TAGWORD 31 -#define R_JUMPTARG 32 /* strange 29k 00xx00xx reloc */ - -#define R_PCR16L 128 -#define R_PCR26L 129 -#define R_VRT16 130 -#define R_HVRT16 131 -#define R_LVRT16 132 -#define R_VRT32 133 - - -/* This reloc identifies mov.b instructions with a 16bit absolute - address. The linker tries to turn insns with this reloc into - an absolute 8-bit address. */ -#define R_MOV16B1 0x41 - -/* This reloc identifies mov.b instructions which had a 16bit - absolute address which have been shortened into a 8-bit - absolute address. */ -#define R_MOV16B2 0x42 - -/* This reloc identifies jmp insns with a 16bit target address; - the linker tries to turn these insns into bra insns with - an 8bit pc-relative target. */ -#define R_JMP1 0x43 - -/* This reloc identifies a bra with an 8-bit pc-relative - target that was formerlly a jmp insn with a 16bit target. */ -#define R_JMP2 0x44 - -/* ??? */ -#define R_RELLONG_NEG 0x45 - -/* This reloc identifies jmp insns with a 24bit target address; - the linker tries to turn these insns into bra insns with - an 8bit pc-relative target. */ -#define R_JMPL1 0x46 - -/* This reloc identifies a bra with an 8-bit pc-relative - target that was formerlly a jmp insn with a 24bit target. */ -#define R_JMPL2 0x47 - -/* This reloc identifies mov.b instructions with a 24bit absolute - address. The linker tries to turn insns with this reloc into - an absolute 8-bit address. */ - -#define R_MOV24B1 0x48 - -/* This reloc identifies mov.b instructions which had a 24bit - absolute address which have been shortened into a 8-bit - absolute address. */ -#define R_MOV24B2 0x49 - -/* An h8300 memory indirect jump/call. Forces the address of the jump/call - target into the function vector (in page zero), and the address of the - vector entry to be placed in the jump/call instruction. */ -#define R_MEM_INDIRECT 0x4a - -/* This reloc identifies a 16bit pc-relative branch target which was - shortened into an 8bit pc-relative branch target. */ -#define R_PCRWORD_B 0x4b - -/* This reloc identifies mov.[wl] instructions with a 32/24 bit - absolute address; the linker may turn this into a mov.[wl] - insn with a 16bit absolute address. */ -#define R_MOVL1 0x4c - -/* This reloc identifies mov.[wl] insns which formerlly had - a 32/24bit absolute address and now have a 16bit absolute address. */ -#define R_MOVL2 0x4d - -/* This reloc identifies a bCC:8 which will have it's condition - inverted and its target redirected to the target of the branch - in the following insn. */ -#define R_BCC_INV 0x4e - -/* This reloc identifies a jmp instruction that has been deleted. */ -#define R_JMP_DEL 0x4f - -/* Z8k modes */ -#define R_IMM16 0x01 /* 16 bit abs */ -#define R_JR 0x02 /* jr 8 bit disp */ -#define R_IMM4L 0x23 /* low nibble */ -#define R_IMM8 0x22 /* 8 bit abs */ -#define R_IMM32 R_RELLONG /* 32 bit abs */ -#define R_CALL R_DA /* Absolute address which could be a callr */ -#define R_JP R_DA /* Absolute address which could be a jp */ -#define R_REL16 0x04 /* 16 bit PC rel */ -#define R_CALLR 0x05 /* callr 12 bit disp */ -#define R_SEG 0x10 /* set if in segmented mode */ -#define R_IMM4H 0x24 /* high nibble */ -#define R_DISP7 0x25 /* djnz displacement */ - -/* H8500 modes */ - -#define R_H8500_IMM8 1 /* 8 bit immediate */ -#define R_H8500_IMM16 2 /* 16 bit immediate */ -#define R_H8500_PCREL8 3 /* 8 bit pcrel */ -#define R_H8500_PCREL16 4 /* 16 bit pcrel */ -#define R_H8500_HIGH8 5 /* high 8 bits of 24 bit address */ -#define R_H8500_LOW16 7 /* low 16 bits of 24 bit immediate */ -#define R_H8500_IMM24 6 /* 24 bit immediate */ -#define R_H8500_IMM32 8 /* 32 bit immediate */ -#define R_H8500_HIGH16 9 /* high 16 bits of 32 bit immediate */ - -/* W65 modes */ - -#define R_W65_ABS8 1 /* addr & 0xff */ -#define R_W65_ABS16 2 /* addr & 0xffff */ -#define R_W65_ABS24 3 /* addr & 0xffffff */ - -#define R_W65_ABS8S8 4 /* (addr >> 8) & 0xff */ -#define R_W65_ABS8S16 5 /* (addr >> 16) & 0xff */ - -#define R_W65_ABS16S8 6 /* (addr >> 8) & 0ffff */ -#define R_W65_ABS16S16 7 /* (addr >> 16) & 0ffff */ - -#define R_W65_PCR8 8 -#define R_W65_PCR16 9 - -#define R_W65_DP 10 /* direct page 8 bits only */ - -#endif /* GNU_COFF_INTERNAL_H */ Index: w65.h =================================================================== --- w65.h (revision 1765) +++ w65.h (nonexistent) @@ -1,201 +0,0 @@ -/*** coff information for WDC 65816 */ - -/********************** FILE HEADER **********************/ - -struct external_filehdr { - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ -}; - - - -#define W65MAGIC 0x6500 - - -#define W65BADMAG(x) (((x).f_magic!=W65MAGIC)) - -#define FILHDR struct external_filehdr -#define FILHSZ 20 - - -/********************** AOUT "OPTIONAL HEADER" **********************/ - - -typedef struct -{ - char magic[2]; /* type of file */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ -} -AOUTHDR; - - -#define AOUTHDRSZ 28 -#define AOUTSZ 28 - - - - -/********************** SECTION HEADER **********************/ - - -struct external_scnhdr { - char s_name[8]; /* section name */ - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[2]; /* number of relocation entries */ - char s_nlnno[2]; /* number of line number entries*/ - char s_flags[4]; /* flags */ -}; - -/* - * names of "special" sections - */ -#define _TEXT ".text" -#define _DATA ".data" -#define _BSS ".bss" - - -#define SCNHDR struct external_scnhdr -#define SCNHSZ 40 - - -/********************** LINE NUMBERS **********************/ - -/* 1 line number entry for every "breakpointable" source line in a section. - * Line numbers are grouped on a per function basis; first entry in a function - * grouping will have l_lnno = 0 and in place of physical address will be the - * symbol table index of the function name. - */ -struct external_lineno { - union { - char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ - char l_paddr[4]; /* (physical) address of line number */ - } l_addr; - char l_lnno[4]; /* line number */ -}; - -#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno)); -#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno)); - -#define LINENO struct external_lineno -#define LINESZ 8 - - -/********************** SYMBOLS **********************/ - -#define E_SYMNMLEN 8 /* # characters in a symbol name */ -#define E_FILNMLEN 14 /* # characters in a file name */ -#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ - -struct external_syment -{ - union { - char e_name[E_SYMNMLEN]; - struct { - char e_zeroes[4]; - char e_offset[4]; - } e; - } e; - char e_value[4]; - char e_scnum[2]; - char e_type[2]; - char e_sclass[1]; - char e_numaux[1]; -}; - - - -#define N_BTMASK (017) -#define N_TMASK (060) -#define N_BTSHFT (4) -#define N_TSHIFT (2) - - -union external_auxent { - struct { - char x_tagndx[4]; /* str, un, or enum tag indx */ - union { - struct { - char x_lnno[2]; /* declaration line number */ - char x_size[2]; /* str/union/array size */ - } x_lnsz; - char x_fsize[4]; /* size of function */ - } x_misc; - union { - struct { /* if ISFCN, tag, or .bb */ - char x_lnnoptr[4]; /* ptr to fcn line # */ - char x_endndx[4]; /* entry ndx past block end */ - } x_fcn; - struct { /* if ISARY, up to 4 dimen. */ - char x_dimen[E_DIMNUM][2]; - } x_ary; - } x_fcnary; - char x_tvndx[2]; /* tv index */ - } x_sym; - - union { - char x_fname[E_FILNMLEN]; - struct { - char x_zeroes[4]; - char x_offset[4]; - } x_n; - } x_file; - - struct { - char x_scnlen[4]; /* section length */ - char x_nreloc[2]; /* # relocation entries */ - char x_nlinno[2]; /* # line numbers */ - } x_scn; - - struct { - char x_tvfill[4]; /* tv fill value */ - char x_tvlen[2]; /* length of .tv */ - char x_tvran[2][2]; /* tv range */ - } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ - - -}; - -#define SYMENT struct external_syment -#define SYMESZ 18 -#define AUXENT union external_auxent -#define AUXESZ 18 - - - -/********************** RELOCATION DIRECTIVES **********************/ - -/* The external reloc has an offset field, because some of the reloc - types on the w65 don't have room in the instruction for the entire - offset - eg the strange jump and high page addressing modes */ - -struct external_reloc { - char r_vaddr[4]; - char r_symndx[4]; - char r_offset[4]; - char r_type[2]; - char r_stuff[2]; -}; - - -#define RELOC struct external_reloc -#define RELSZ 16 - - - - Index: tic30.h =================================================================== --- tic30.h (revision 1765) +++ tic30.h (nonexistent) @@ -1,203 +0,0 @@ -/*** coff information for Texas Instruments TMS320C3X */ - -/********************** FILE HEADER **********************/ - -struct external_filehdr { - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ -}; - - -#define TIC30MAGIC 0xC000 - -#define TIC30BADMAG(x) (((x).f_magic!=TIC30MAGIC)) - -#define FILHDR struct external_filehdr -#define FILHSZ 20 - - -/********************** AOUT "OPTIONAL HEADER" **********************/ - - -typedef struct -{ - char magic[2]; /* type of file */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ -} -AOUTHDR; - - -#define AOUTHDRSZ 28 -#define AOUTSZ 28 - - - - -/********************** SECTION HEADER **********************/ - - -struct external_scnhdr { - char s_name[8]; /* section name */ - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[2]; /* number of relocation entries */ - char s_nlnno[2]; /* number of line number entries*/ - char s_flags[4]; /* flags */ -}; - -/* - * names of "special" sections - */ -#define _TEXT ".text" -#define _DATA ".data" -#define _BSS ".bss" - - -#define SCNHDR struct external_scnhdr -#define SCNHSZ 40 - - -/********************** LINE NUMBERS **********************/ - -/* 1 line number entry for every "breakpointable" source line in a section. - * Line numbers are grouped on a per function basis; first entry in a function - * grouping will have l_lnno = 0 and in place of physical address will be the - * symbol table index of the function name. - */ -struct external_lineno { - union { - char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ - char l_paddr[4]; /* (physical) address of line number */ - } l_addr; - char l_lnno[4]; /* line number */ -}; - -#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno)); -#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno)); - -#define LINENO struct external_lineno -#define LINESZ 8 - - -/********************** SYMBOLS **********************/ - -#define E_SYMNMLEN 8 /* # characters in a symbol name */ -#define E_FILNMLEN 14 /* # characters in a file name */ -#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ - -struct external_syment -{ - union { - char e_name[E_SYMNMLEN]; - struct { - char e_zeroes[4]; - char e_offset[4]; - } e; - } e; - char e_value[4]; - char e_scnum[2]; - char e_type[2]; - char e_sclass[1]; - char e_numaux[1]; -}; - - - -#define N_BTMASK (017) -#define N_TMASK (060) -#define N_BTSHFT (4) -#define N_TSHIFT (2) - - -union external_auxent { - struct { - char x_tagndx[4]; /* str, un, or enum tag indx */ - union { - struct { - char x_lnno[2]; /* declaration line number */ - char x_size[2]; /* str/union/array size */ - } x_lnsz; - char x_fsize[4]; /* size of function */ - } x_misc; - union { - struct { /* if ISFCN, tag, or .bb */ - char x_lnnoptr[4]; /* ptr to fcn line # */ - char x_endndx[4]; /* entry ndx past block end */ - } x_fcn; - struct { /* if ISARY, up to 4 dimen. */ - char x_dimen[E_DIMNUM][2]; - } x_ary; - } x_fcnary; - char x_tvndx[2]; /* tv index */ - } x_sym; - - union { - char x_fname[E_FILNMLEN]; - struct { - char x_zeroes[4]; - char x_offset[4]; - } x_n; - } x_file; - - struct { - char x_scnlen[4]; /* section length */ - char x_nreloc[2]; /* # relocation entries */ - char x_nlinno[2]; /* # line numbers */ - } x_scn; - - struct { - char x_tvfill[4]; /* tv fill value */ - char x_tvlen[2]; /* length of .tv */ - char x_tvran[2][2]; /* tv range */ - } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ - - -}; - -#define SYMENT struct external_syment -#define SYMESZ 18 -#define AUXENT union external_auxent -#define AUXESZ 18 - - - -/********************** RELOCATION DIRECTIVES **********************/ - -/* The external reloc has an offset field, because some of the reloc - types on the z8k don't have room in the instruction for the entire - offset - eg with segments */ - -struct external_reloc { - char r_vaddr[4]; - char r_symndx[4]; - char r_offset[4]; - char r_type[2]; - char r_stuff[2]; -}; - - -#define RELOC struct external_reloc -#define RELSZ 16 - -/* TMS320C30 relocation types. */ - -#define R_TIC30_ABS16 0x100 /* 16 bit absolute. */ -#define R_TIC30_ABS24 0x101 /* 24 bit absolute. */ -#define R_TIC30_ABS32 0x102 /* 32 bit absolute. */ -#define R_TIC30_LDP 0x103 /* LDP bits 23-16 to 7-0. */ -#define R_TIC30_PC16 0x104 /* 16 bit pc relative. */ Index: ecoff.h =================================================================== --- ecoff.h (revision 1765) +++ ecoff.h (nonexistent) @@ -1,421 +0,0 @@ -#ifndef ECOFF_H -#define ECOFF_H - -/* Generic ECOFF support. - This does not include symbol information, found in sym.h and - symconst.h. */ - -/* Mips magic numbers used in filehdr. MIPS_MAGIC_LITTLE is used on - little endian machines. MIPS_MAGIC_BIG is used on big endian - machines. Where is MIPS_MAGIC_1 from? */ -#define MIPS_MAGIC_1 0x0180 -#define MIPS_MAGIC_LITTLE 0x0162 -#define MIPS_MAGIC_BIG 0x0160 - -/* These are the magic numbers used for MIPS code compiled at ISA - level 2. */ -#define MIPS_MAGIC_LITTLE2 0x0166 -#define MIPS_MAGIC_BIG2 0x0163 - -/* These are the magic numbers used for MIPS code compiled at ISA - level 3. */ -#define MIPS_MAGIC_LITTLE3 0x142 -#define MIPS_MAGIC_BIG3 0x140 - -/* Alpha magic numbers used in filehdr. */ -#define ALPHA_MAGIC 0x183 -#define ALPHA_MAGIC_BSD 0x185 - -/* Magic numbers used in a.out header. */ -#define ECOFF_AOUT_OMAGIC 0407 /* not demand paged (ld -N). */ -#define ECOFF_AOUT_ZMAGIC 0413 /* demand load format, eg normal ld output */ - -/* Names of special sections. */ -#define _TEXT ".text" -#define _DATA ".data" -#define _BSS ".bss" -#define _RDATA ".rdata" -#define _SDATA ".sdata" -#define _SBSS ".sbss" -#define _LITA ".lita" -#define _LIT4 ".lit4" -#define _LIT8 ".lit8" -#define _LIB ".lib" -#define _INIT ".init" -#define _FINI ".fini" -#define _PDATA ".pdata" -#define _XDATA ".xdata" -#define _GOT ".got" -#define _HASH ".hash" -#define _DYNSYM ".dynsym" -#define _DYNSTR ".dynstr" -#define _RELDYN ".rel.dyn" -#define _CONFLIC ".conflic" -#define _COMMENT ".comment" -#define _LIBLIST ".liblist" -#define _DYNAMIC ".dynamic" -#define _RCONST ".rconst" - -/* ECOFF uses some additional section flags. */ -#define STYP_RDATA 0x100 -#define STYP_SDATA 0x200 -#define STYP_SBSS 0x400 -#define STYP_GOT 0x1000 -#define STYP_DYNAMIC 0x2000 -#define STYP_DYNSYM 0x4000 -#define STYP_RELDYN 0x8000 -#define STYP_DYNSTR 0x10000 -#define STYP_HASH 0x20000 -#define STYP_LIBLIST 0x40000 -#define STYP_CONFLIC 0x100000 -#define STYP_ECOFF_FINI 0x1000000 -#define STYP_EXTENDESC 0x2000000 /* 0x02FFF000 bits => scn type, rest clr */ -#define STYP_LITA 0x4000000 -#define STYP_LIT8 0x8000000 -#define STYP_LIT4 0x10000000 -#define STYP_ECOFF_LIB 0x40000000 -#define STYP_ECOFF_INIT 0x80000000 -#define STYP_OTHER_LOAD (STYP_ECOFF_INIT | STYP_ECOFF_FINI) - -/* extended section types */ -#define STYP_COMMENT 0x2100000 -#define STYP_RCONST 0x2200000 -#define STYP_XDATA 0x2400000 -#define STYP_PDATA 0x2800000 - -/* The linker needs a section to hold small common variables while - linking. There is no convenient way to create it when the linker - needs it, so we always create one for each BFD. We then avoid - writing it out. */ -#define SCOMMON ".scommon" - -/* If the extern bit in a reloc is 1, then r_symndx is an index into - the external symbol table. If the extern bit is 0, then r_symndx - indicates a section, and is one of the following values. */ -#define RELOC_SECTION_NONE 0 -#define RELOC_SECTION_TEXT 1 -#define RELOC_SECTION_RDATA 2 -#define RELOC_SECTION_DATA 3 -#define RELOC_SECTION_SDATA 4 -#define RELOC_SECTION_SBSS 5 -#define RELOC_SECTION_BSS 6 -#define RELOC_SECTION_INIT 7 -#define RELOC_SECTION_LIT8 8 -#define RELOC_SECTION_LIT4 9 -#define RELOC_SECTION_XDATA 10 -#define RELOC_SECTION_PDATA 11 -#define RELOC_SECTION_FINI 12 -#define RELOC_SECTION_LITA 13 -#define RELOC_SECTION_ABS 14 -#define RELOC_SECTION_RCONST 15 - -#define NUM_RELOC_SECTIONS 16 - -/********************** STABS **********************/ - -/* gcc uses mips-tfile to output type information in special stabs - entries. These must match the corresponding definition in - gcc/config/mips.h. At some point, these should probably go into a - shared include file, but currently gcc and gdb do not share any - directories. */ -#define CODE_MASK 0x8F300 -#define ECOFF_IS_STAB(sym) (((sym)->index & 0xFFF00) == CODE_MASK) -#define ECOFF_MARK_STAB(code) ((code)+CODE_MASK) -#define ECOFF_UNMARK_STAB(code) ((code)-CODE_MASK) -#define STABS_SYMBOL "@stabs" - -/********************** COFF **********************/ - -/* gcc also uses mips-tfile to output COFF debugging information. - These are the values it uses when outputting the .type directive. - These should also be in a shared include file. */ -#define N_BTMASK (017) -#define N_TMASK (060) -#define N_BTSHFT (4) -#define N_TSHIFT (2) - -/********************** AUX **********************/ - -/* The auxiliary type information is the same on all known ECOFF - targets. I can't see any reason that it would ever change, so I am - going to gamble and define the external structures here, in the - target independent ECOFF header file. The internal forms are - defined in coff/sym.h, which was originally donated by MIPS - Computer Systems. */ - -/* 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 ((unsigned int) 0x80) -#define TIR_BITS1_FBITFIELD_LITTLE ((unsigned int) 0x01) - -#define TIR_BITS1_CONTINUED_BIG ((unsigned int) 0x40) -#define TIR_BITS1_CONTINUED_LITTLE ((unsigned int) 0x02) - -#define TIR_BITS1_BT_BIG ((unsigned int) 0x3F) -#define TIR_BITS1_BT_SH_BIG 0 -#define TIR_BITS1_BT_LITTLE ((unsigned int) 0xFC) -#define TIR_BITS1_BT_SH_LITTLE 2 - -#define TIR_BITS_TQ4_BIG ((unsigned int) 0xF0) -#define TIR_BITS_TQ4_SH_BIG 4 -#define TIR_BITS_TQ5_BIG ((unsigned int) 0x0F) -#define TIR_BITS_TQ5_SH_BIG 0 -#define TIR_BITS_TQ4_LITTLE ((unsigned int) 0x0F) -#define TIR_BITS_TQ4_SH_LITTLE 0 -#define TIR_BITS_TQ5_LITTLE ((unsigned int) 0xF0) -#define TIR_BITS_TQ5_SH_LITTLE 4 - -#define TIR_BITS_TQ0_BIG ((unsigned int) 0xF0) -#define TIR_BITS_TQ0_SH_BIG 4 -#define TIR_BITS_TQ1_BIG ((unsigned int) 0x0F) -#define TIR_BITS_TQ1_SH_BIG 0 -#define TIR_BITS_TQ0_LITTLE ((unsigned int) 0x0F) -#define TIR_BITS_TQ0_SH_LITTLE 0 -#define TIR_BITS_TQ1_LITTLE ((unsigned int) 0xF0) -#define TIR_BITS_TQ1_SH_LITTLE 4 - -#define TIR_BITS_TQ2_BIG ((unsigned int) 0xF0) -#define TIR_BITS_TQ2_SH_BIG 4 -#define TIR_BITS_TQ3_BIG ((unsigned int) 0x0F) -#define TIR_BITS_TQ3_SH_BIG 0 -#define TIR_BITS_TQ2_LITTLE ((unsigned int) 0x0F) -#define TIR_BITS_TQ2_SH_LITTLE 0 -#define TIR_BITS_TQ3_LITTLE ((unsigned int) 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 ((unsigned int) 0xF0) -#define RNDX_BITS1_RFD_SH_BIG 4 - -#define RNDX_BITS0_RFD_SH_LEFT_LITTLE 0 -#define RNDX_BITS1_RFD_LITTLE ((unsigned int) 0x0F) -#define RNDX_BITS1_RFD_SH_LEFT_LITTLE 8 - -#define RNDX_BITS1_INDEX_BIG ((unsigned int) 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 ((unsigned int) 0xF0) -#define RNDX_BITS1_INDEX_SH_LITTLE 4 -#define RNDX_BITS2_INDEX_SH_LEFT_LITTLE 4 -#define RNDX_BITS3_INDEX_SH_LEFT_LITTLE 12 - -/* Auxiliary 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]; -}; - -#define AUX_GET_ANY(bigend, ax, field) \ - ((bigend) ? bfd_getb32 ((ax)->field) : bfd_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) \ - ? (bfd_putb32 ((bfd_vma) (val), (ax)->field), 0) \ - : (bfd_putl32 ((bfd_vma) (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) - -/********************** SYMBOLS **********************/ - -/* For efficiency, gdb deals directly with the unswapped symbolic - information (that way it only takes the time to swap information - that it really needs to read). gdb originally retrieved the - information directly from the BFD backend information, but that - strategy, besides being sort of ugly, does not work for MIPS ELF, - which also uses ECOFF debugging information. This structure holds - pointers to the (mostly) unswapped symbolic information. */ - -struct ecoff_debug_info -{ - /* The swapped ECOFF symbolic header. */ - HDRR symbolic_header; - - /* Pointers to the unswapped symbolic information. Note that the - pointers to external structures point to different sorts of - information on different ECOFF targets. The ecoff_debug_swap - structure provides the sizes of the structures and the functions - needed to swap the information in and out. These pointers are - all pointers to arrays, not single structures. They will be NULL - if there are no instances of the relevant structure. These - fields are also used by the assembler to output ECOFF debugging - information. */ - unsigned char *line; - PTR external_dnr; /* struct dnr_ext */ - PTR external_pdr; /* struct pdr_ext */ - PTR external_sym; /* struct sym_ext */ - PTR external_opt; /* struct opt_ext */ - union aux_ext *external_aux; - char *ss; - char *ssext; - PTR external_fdr; /* struct fdr_ext */ - PTR external_rfd; /* struct rfd_ext */ - PTR external_ext; /* struct ext_ext */ - - /* These fields are used when linking. They may disappear at some - point. */ - char *ssext_end; - PTR external_ext_end; - - /* When linking, this field holds a mapping from the input FDR - numbers to the output numbers, and is used when writing out the - external symbols. It is NULL if no mapping is required. */ - RFDT *ifdmap; - - /* The swapped FDR information. Currently this is never NULL, but - code using this structure should probably double-check in case - this changes in the future. This is a pointer to an array, not a - single structure. */ - FDR *fdr; - - /* When relaxing MIPS embedded PIC code, we may need to adjust - symbol values when they are output. This is a linked list of - structures indicating how values should be adjusted. There is no - requirement that the entries be in any order, or that they not - overlap. This field is normally NULL, in which case no - adjustments need to be made. */ - struct ecoff_value_adjust *adjust; -}; - -/* This structure describes how to adjust symbol values when - outputting MIPS embedded PIC code. These adjustments only apply to - the internal symbols, as the external symbol values will come from - the hash table and have already been adjusted. */ - -struct ecoff_value_adjust -{ - /* Next entry on adjustment list. */ - struct ecoff_value_adjust *next; - /* Starting VMA of adjustment. This is the VMA in the ECOFF file, - not the offset from the start of the section. Thus it should - indicate a particular section. */ - bfd_vma start; - /* Ending VMA of adjustment. */ - bfd_vma end; - /* Adjustment. This should be added to the value of the symbol, or - FDR. This is zero for the last entry in the array. */ - long adjust; -}; - -/* These structures are used by the ECOFF find_nearest_line function. */ - -struct ecoff_fdrtab_entry -{ - /* Base address in .text of this FDR. */ - bfd_vma base_addr; - FDR *fdr; -}; - -struct ecoff_find_line -{ - /* Allocated memory to hold function and file names. */ - char *find_buffer; - - /* FDR table, sorted by address: */ - long fdrtab_len; - struct ecoff_fdrtab_entry *fdrtab; - - /* Cache entry for most recently found line information. The sect - field is NULL if this cache does not contain valid information. */ - struct - { - asection *sect; - bfd_vma start; - bfd_vma stop; - const char *filename; - const char *functionname; - unsigned int line_num; - } cache; -}; - -/********************** SWAPPING **********************/ - -/* The generic ECOFF code needs to be able to swap debugging - information in and out in the specific format used by a particular - ECOFF implementation. This structure provides the information - needed to do this. */ - -struct ecoff_debug_swap -{ - /* Symbol table magic number. */ - int sym_magic; - /* Alignment of debugging information. E.g., 4. */ - bfd_size_type debug_align; - /* Sizes of external symbolic information. */ - bfd_size_type external_hdr_size; - bfd_size_type external_dnr_size; - bfd_size_type external_pdr_size; - bfd_size_type external_sym_size; - bfd_size_type external_opt_size; - bfd_size_type external_fdr_size; - bfd_size_type external_rfd_size; - bfd_size_type external_ext_size; - /* Functions to swap in external symbolic data. */ - void (*swap_hdr_in) PARAMS ((bfd *, PTR, HDRR *)); - void (*swap_dnr_in) PARAMS ((bfd *, PTR, DNR *)); - void (*swap_pdr_in) PARAMS ((bfd *, PTR, PDR *)); - void (*swap_sym_in) PARAMS ((bfd *, PTR, SYMR *)); - void (*swap_opt_in) PARAMS ((bfd *, PTR, OPTR *)); - void (*swap_fdr_in) PARAMS ((bfd *, PTR, FDR *)); - void (*swap_rfd_in) PARAMS ((bfd *, PTR, RFDT *)); - void (*swap_ext_in) PARAMS ((bfd *, PTR, EXTR *)); - void (*swap_tir_in) PARAMS ((int, const struct tir_ext *, TIR *)); - void (*swap_rndx_in) PARAMS ((int, const struct rndx_ext *, RNDXR *)); - /* Functions to swap out external symbolic data. */ - void (*swap_hdr_out) PARAMS ((bfd *, const HDRR *, PTR)); - void (*swap_dnr_out) PARAMS ((bfd *, const DNR *, PTR)); - void (*swap_pdr_out) PARAMS ((bfd *, const PDR *, PTR)); - void (*swap_sym_out) PARAMS ((bfd *, const SYMR *, PTR)); - void (*swap_opt_out) PARAMS ((bfd *, const OPTR *, PTR)); - void (*swap_fdr_out) PARAMS ((bfd *, const FDR *, PTR)); - void (*swap_rfd_out) PARAMS ((bfd *, const RFDT *, PTR)); - void (*swap_ext_out) PARAMS ((bfd *, const EXTR *, PTR)); - void (*swap_tir_out) PARAMS ((int, const TIR *, struct tir_ext *)); - void (*swap_rndx_out) PARAMS ((int, const RNDXR *, struct rndx_ext *)); - /* Function to read symbol data and set up pointers in - ecoff_debug_info structure. The section argument is used for - ELF, not straight ECOFF. */ - boolean (*read_debug_info) PARAMS ((bfd *, asection *, - struct ecoff_debug_info *)); -}; - -#endif /* ! defined (ECOFF_H) */ Index: m68k.h =================================================================== --- m68k.h (revision 1765) +++ m68k.h (nonexistent) @@ -1,225 +0,0 @@ -/*** coff information for M68K */ - -#ifndef GNU_COFF_M68K_H -#define GNU_COFF_M68K_H 1 - -/********************** FILE HEADER **********************/ - -struct external_filehdr { - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ -}; - - -/* Motorola 68000/68008/68010/68020 */ -#define MC68MAGIC 0520 -#define MC68KWRMAGIC 0520 /* writeable text segments */ -#define MC68TVMAGIC 0521 -#define MC68KROMAGIC 0521 /* readonly shareable text segments */ -#define MC68KPGMAGIC 0522 /* demand paged text segments */ -#define M68MAGIC 0210 -#define M68TVMAGIC 0211 - -/* this is the magic of the Bull dpx/2 */ -#define MC68KBCSMAGIC 0526 - -/* This is Lynx's all-platform magic number for executables. */ - -#define LYNXCOFFMAGIC 0415 - -#define OMAGIC M68MAGIC - -/* This intentionally does not include MC68KBCSMAGIC; it only includes - magic numbers which imply that names do not have underscores. */ -#define M68KBADMAG(x) (((x).f_magic!=MC68MAGIC) && ((x).f_magic!=MC68KWRMAGIC) && ((x).f_magic!=MC68TVMAGIC) && \ - ((x).f_magic!=MC68KROMAGIC) && ((x).f_magic!=MC68KPGMAGIC) && ((x).f_magic!=M68MAGIC) && ((x).f_magic!=M68TVMAGIC) && ((x).f_magic!=LYNXCOFFMAGIC) ) - -/* Magic numbers for the a.out header. */ - -#define PAGEMAGICEXECSWAPPED 0407 /* executable (swapped) */ -#define PAGEMAGICPEXECSWAPPED 0410 /* pure executable (swapped) */ -#define PAGEMAGICPEXECTSHLIB 0443 /* pure executable (target shared library) */ -#define PAGEMAGICPEXECPAGED 0413 /* pure executable (paged) */ - -#define FILHDR struct external_filehdr -#define FILHSZ 20 - - -/********************** AOUT "OPTIONAL HEADER" **********************/ - - -typedef struct -{ - char magic[2]; /* type of file */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ -} -AOUTHDR; - -#define AOUTSZ 28 -#define AOUTHDRSZ 28 - - -/********************** SECTION HEADER **********************/ - - -struct external_scnhdr { - char s_name[8]; /* section name */ - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[2]; /* number of relocation entries */ - char s_nlnno[2]; /* number of line number entries*/ - char s_flags[4]; /* flags */ -}; - -/* - * names of "special" sections - */ -#define _TEXT ".text" -#define _DATA ".data" -#define _BSS ".bss" -#define _COMMENT ".comment" - -#define SCNHDR struct external_scnhdr -#define SCNHSZ 40 - - -/********************** LINE NUMBERS **********************/ - -/* 1 line number entry for every "breakpointable" source line in a section. - * Line numbers are grouped on a per function basis; first entry in a function - * grouping will have l_lnno = 0 and in place of physical address will be the - * symbol table index of the function name. - */ -struct external_lineno { - union { - char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ - char l_paddr[4]; /* (physical) address of line number */ - } l_addr; - char l_lnno[2]; /* line number */ -}; - - -#define LINENO struct external_lineno -#define LINESZ 6 - - -/********************** SYMBOLS **********************/ - -#define E_SYMNMLEN 8 /* # characters in a symbol name */ -#define E_FILNMLEN 14 /* # characters in a file name */ -#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ - -struct external_syment -{ - union { - char e_name[E_SYMNMLEN]; - struct { - char e_zeroes[4]; - char e_offset[4]; - } e; - } e; - char e_value[4]; - char e_scnum[2]; - char e_type[2]; - char e_sclass[1]; - char e_numaux[1]; -}; - - - -#define N_BTMASK (017) -#define N_TMASK (060) -#define N_BTSHFT (4) -#define N_TSHIFT (2) - - -union external_auxent { - struct { - char x_tagndx[4]; /* str, un, or enum tag indx */ - union { - struct { - char x_lnno[2]; /* declaration line number */ - char x_size[2]; /* str/union/array size */ - } x_lnsz; - char x_fsize[4]; /* size of function */ - } x_misc; - union { - struct { /* if ISFCN, tag, or .bb */ - char x_lnnoptr[4]; /* ptr to fcn line # */ - char x_endndx[4]; /* entry ndx past block end */ - } x_fcn; - struct { /* if ISARY, up to 4 dimen. */ - char x_dimen[E_DIMNUM][2]; - } x_ary; - } x_fcnary; - char x_tvndx[2]; /* tv index */ - } x_sym; - - union { - char x_fname[E_FILNMLEN]; - struct { - char x_zeroes[4]; - char x_offset[4]; - } x_n; - } x_file; - - struct { - char x_scnlen[4]; /* section length */ - char x_nreloc[2]; /* # relocation entries */ - char x_nlinno[2]; /* # line numbers */ - } x_scn; - - struct { - char x_tvfill[4]; /* tv fill value */ - char x_tvlen[2]; /* length of .tv */ - char x_tvran[2][2]; /* tv range */ - } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ - - -}; - -#define SYMENT struct external_syment -#define SYMESZ 18 -#define AUXENT union external_auxent -#define AUXESZ 18 - - - -/********************** RELOCATION DIRECTIVES **********************/ - - -struct external_reloc { - char r_vaddr[4]; - char r_symndx[4]; - char r_type[2]; -#ifdef M68K_COFF_OFFSET - char r_offset[4]; -#endif - -}; - - -#define RELOC struct external_reloc - -#ifdef M68K_COFF_OFFSET -#define RELSZ 14 -#else -#define RELSZ 10 -#endif - -#endif /* GNU_COFF_M68K_H */ Index: i860.h =================================================================== --- i860.h (revision 1765) +++ i860.h (nonexistent) @@ -1,205 +0,0 @@ -/* This file was hacked from i386.h [dolan@ssd.intel.com] */ - -/*** coff information for Intel 860. */ - - -/********************** FILE HEADER **********************/ - -struct external_filehdr { - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ -}; - - -/* Bits for f_flags: - * F_RELFLG relocation info stripped from file - * F_EXEC file is executable (no unresolved external references) - * F_LNNO line numbers stripped from file - * F_LSYMS local symbols stripped from file - * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax) - */ - -#define F_RELFLG (0x0001) -#define F_EXEC (0x0002) -#define F_LNNO (0x0004) -#define F_LSYMS (0x0008) - - - -#define I860MAGIC 0x14d - -#define I860BADMAG(x) ((x).f_magic != I860MAGIC) - -#define FILHDR struct external_filehdr -#define FILHSZ 20 - - -/********************** AOUT "OPTIONAL HEADER" **********************/ - - -typedef struct -{ - char magic[2]; /* type of file */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ -} -AOUTHDR; - - -#define AOUTSZ 28 -#define AOUTHDRSZ 28 - -/* FIXME: What are the a.out magic numbers? */ - -/********************** SECTION HEADER **********************/ - - -struct external_scnhdr { - char s_name[8]; /* section name */ - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[2]; /* number of relocation entries */ - char s_nlnno[2]; /* number of line number entries*/ - char s_flags[4]; /* flags */ -}; - -#define SCNHDR struct external_scnhdr -#define SCNHSZ 40 - -/* - * names of "special" sections - */ -#define _TEXT ".text" -#define _DATA ".data" -#define _BSS ".bss" -#define _COMMENT ".comment" -#define _LIB ".lib" - -/********************** LINE NUMBERS **********************/ - -/* 1 line number entry for every "breakpointable" source line in a section. - * Line numbers are grouped on a per function basis; first entry in a function - * grouping will have l_lnno = 0 and in place of physical address will be the - * symbol table index of the function name. - */ -struct external_lineno { - union { - char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ - char l_paddr[4]; /* (physical) address of line number */ - } l_addr; - char l_lnno[2]; /* line number */ -}; - - -#define LINENO struct external_lineno -#define LINESZ 6 - - -/********************** SYMBOLS **********************/ - -#define E_SYMNMLEN 8 /* # characters in a symbol name */ -#define E_FILNMLEN 14 /* # characters in a file name */ -#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ - -struct external_syment -{ - union { - char e_name[E_SYMNMLEN]; - struct { - char e_zeroes[4]; - char e_offset[4]; - } e; - } e; - char e_value[4]; - char e_scnum[2]; - char e_type[2]; - char e_sclass[1]; - char e_numaux[1]; -}; - -#define N_BTMASK (0xf) -#define N_TMASK (0x30) -#define N_BTSHFT (4) -#define N_TSHIFT (2) - -union external_auxent { - struct { - char x_tagndx[4]; /* str, un, or enum tag indx */ - union { - struct { - char x_lnno[2]; /* declaration line number */ - char x_size[2]; /* str/union/array size */ - } x_lnsz; - char x_fsize[4]; /* size of function */ - } x_misc; - union { - struct { /* if ISFCN, tag, or .bb */ - char x_lnnoptr[4]; /* ptr to fcn line # */ - char x_endndx[4]; /* entry ndx past block end */ - } x_fcn; - struct { /* if ISARY, up to 4 dimen. */ - char x_dimen[E_DIMNUM][2]; - } x_ary; - } x_fcnary; - char x_tvndx[2]; /* tv index */ - } x_sym; - - union { - char x_fname[E_FILNMLEN]; - struct { - char x_zeroes[4]; - char x_offset[4]; - } x_n; - } x_file; - - struct { - char x_scnlen[4]; /* section length */ - char x_nreloc[2]; /* # relocation entries */ - char x_nlinno[2]; /* # line numbers */ - } x_scn; - - struct { - char x_tvfill[4]; /* tv fill value */ - char x_tvlen[2]; /* length of .tv */ - char x_tvran[2][2]; /* tv range */ - } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ - - -}; - -#define SYMENT struct external_syment -#define SYMESZ 18 -#define AUXENT union external_auxent -#define AUXESZ 18 - - -# define _ETEXT "etext" - - -/********************** RELOCATION DIRECTIVES **********************/ - - - -struct external_reloc { - char r_vaddr[4]; - char r_symndx[4]; - char r_type[2]; -}; - - -#define RELOC struct external_reloc -#define RELSZ 10 Index: i960.h =================================================================== --- i960.h (revision 1765) +++ i960.h (nonexistent) @@ -1,275 +0,0 @@ -/*** coff information for 80960. Origins: Intel corp, natch. */ - -/* NOTE: Tagentries (cf TAGBITS) are no longer used by the 960 */ - -/********************** FILE HEADER **********************/ - -struct external_filehdr { - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ -}; - -#define OMAGIC (0407) /* old impure format. data immediately - follows text. both sections are rw. */ -#define NMAGIC (0410) /* split i&d, read-only text */ - -/* -* Intel 80960 (I960) processor flags. -* F_I960TYPE == mask for processor type field. -*/ - -#define F_I960TYPE (0xf000) -#define F_I960CORE (0x1000) -#define F_I960KB (0x2000) -#define F_I960SB (0x2000) -#define F_I960MC (0x3000) -#define F_I960XA (0x4000) -#define F_I960CA (0x5000) -#define F_I960KA (0x6000) -#define F_I960SA (0x6000) -#define F_I960JX (0x7000) -#define F_I960HX (0x8000) - - -/** i80960 Magic Numbers -*/ - -#define I960ROMAGIC (0x160) /* read-only text segments */ -#define I960RWMAGIC (0x161) /* read-write text segments */ - -#define I960BADMAG(x) (((x).f_magic!=I960ROMAGIC) && ((x).f_magic!=I960RWMAGIC)) - -#define FILHDR struct external_filehdr -#define FILHSZ 20 - -/********************** AOUT "OPTIONAL HEADER" **********************/ - -typedef struct { - unsigned long phys_addr; - unsigned long bitarray; -} TAGBITS; - - - -typedef struct -{ - char magic[2]; /* type of file */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ - char tagentries[4]; /* number of tag entries to follow */ -} -AOUTHDR; - -/* return a pointer to the tag bits array */ - -#define TAGPTR(aout) ((TAGBITS *) (&(aout.tagentries)+1)) - -/* compute size of a header */ - -/*#define AOUTSZ(aout) (sizeof(AOUTHDR)+(aout.tagentries*sizeof(TAGBITS)))*/ -#define AOUTSZ 32 -#define AOUTHDRSZ 32 - - -/********************** SECTION HEADER **********************/ - - -struct external_scnhdr { - char s_name[8]; /* section name */ - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[2]; /* number of relocation entries */ - char s_nlnno[2]; /* number of line number entries*/ - char s_flags[4]; /* flags */ - char s_align[4]; /* section alignment */ -}; - - -#define SCNHDR struct external_scnhdr -#define SCNHSZ 44 - -/* - * names of "special" sections - */ -#define _TEXT ".text" -#define _DATA ".data" -#define _BSS ".bss" - -/********************** LINE NUMBERS **********************/ - -/* 1 line number entry for every "breakpointable" source line in a section. - * Line numbers are grouped on a per function basis; first entry in a function - * grouping will have l_lnno = 0 and in place of physical address will be the - * symbol table index of the function name. - */ -struct external_lineno { - union { - char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ - char l_paddr[4]; /* (physical) address of line number */ - } l_addr; - char l_lnno[2]; /* line number */ - char padding[2]; /* force alignment */ -}; - - -#define LINENO struct external_lineno -#define LINESZ 8 - - -/********************** SYMBOLS **********************/ - -#define E_SYMNMLEN 8 /* # characters in a symbol name */ -#define E_FILNMLEN 14 /* # characters in a file name */ -#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ - -struct external_syment -{ - union { - char e_name[E_SYMNMLEN]; - struct { - char e_zeroes[4]; - char e_offset[4]; - } e; - } e; - char e_value[4]; - char e_scnum[2]; - char e_flags[2]; - char e_type[4]; - char e_sclass[1]; - char e_numaux[1]; - char pad2[2]; -}; - - - - -#define N_BTMASK (0x1f) -#define N_TMASK (0x60) -#define N_BTSHFT (5) -#define N_TSHIFT (2) - -union external_auxent { - struct { - char x_tagndx[4]; /* str, un, or enum tag indx */ - union { - struct { - char x_lnno[2]; /* declaration line number */ - char x_size[2]; /* str/union/array size */ - } x_lnsz; - char x_fsize[4]; /* size of function */ - } x_misc; - union { - struct { /* if ISFCN, tag, or .bb */ - char x_lnnoptr[4]; /* ptr to fcn line # */ - char x_endndx[4]; /* entry ndx past block end */ - } x_fcn; - struct { /* if ISARY, up to 4 dimen. */ - char x_dimen[E_DIMNUM][2]; - } x_ary; - } x_fcnary; - char x_tvndx[2]; /* tv index */ - } x_sym; - - union { - char x_fname[E_FILNMLEN]; - struct { - char x_zeroes[4]; - char x_offset[4]; - } x_n; - } x_file; - - struct { - char x_scnlen[4]; /* section length */ - char x_nreloc[2]; /* # relocation entries */ - char x_nlinno[2]; /* # line numbers */ - } x_scn; - - struct { - char x_tvfill[4]; /* tv fill value */ - char x_tvlen[2]; /* length of .tv */ - char x_tvran[2][2]; /* tv range */ - } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ - - /****************************************** - * I960-specific *2nd* aux. entry formats - ******************************************/ - struct { - /* This is a very old typo that keeps getting propagated. */ -#define x_stdindx x_stindx - char x_stindx[4]; /* sys. table entry */ - } x_sc; /* system call entry */ - - struct { - char x_balntry[4]; /* BAL entry point */ - } x_bal; /* BAL-callable function */ - - struct { - char x_timestamp[4]; /* time stamp */ - char x_idstring[20]; /* producer identity string */ - } x_ident; /* Producer ident info */ - -}; - - - -#define SYMENT struct external_syment -#define SYMESZ 24 -#define AUXENT union external_auxent -#define AUXESZ 24 - -# define _ETEXT "_etext" - -/********************** RELOCATION DIRECTIVES **********************/ - -struct external_reloc { - char r_vaddr[4]; - char r_symndx[4]; - char r_type[2]; - char pad[2]; -}; - -/* r_type values for the i960. */ - -/* The i960 uses R_RELLONG, which is defined in internal.h as 0x11. - It is an absolute 32 bit relocation. */ - -#define R_IPRMED (0x19) /* 24-bit ip-relative relocation */ -#define R_OPTCALL (0x1b) /* 32-bit optimizable call (leafproc/sysproc) */ -#define R_OPTCALLX (0x1c) /* 64-bit optimizable call (leafproc/sysproc) */ - -/* The following relocation types are defined use by relaxing linkers, - which convert 32 bit calls (which require a 64 bit instruction) - into 24 bit calls (which require a 32 bit instruction) when - possible. It will be possible whenever the target of the call is - within a 24 bit range of the call instruction. - - It is always safe to ignore these relocations. They only serve to - mark points which the relaxing linker will have to consider. The - assembler must ensure that the correct code is generated even if - the relocations are ignored. In particular, this means that the - R_IPR13 relocation may not appear with an external symbol. */ - -#define R_IPR13 (0x1d) /* 13 bit ip-relative branch */ -#define R_ALIGN (0x1e) /* alignment marker. This has no - associated symbol. Instead, the - r_symndx field indicates the - require alignment at this point in - the file. It must be a power of 2. */ - -#define RELOC struct external_reloc -#define RELSZ 12 - Index: m88k.h =================================================================== --- m88k.h (revision 1765) +++ m88k.h (nonexistent) @@ -1,219 +0,0 @@ -/*** coff information for 88k bcs */ - -/********************** FILE HEADER **********************/ -struct external_filehdr { - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[4]; /* file pointer to symtab */ - char f_nsyms[4]; /* number of symtab entries */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ -}; - -#define MC88MAGIC 0540 /* 88k BCS executable */ -#define MC88DMAGIC 0541 /* DG/UX executable */ -#define MC88OMAGIC 0555 /* Object file */ - -#define MC88BADMAG(x) (((x).f_magic!=MC88MAGIC) &&((x).f_magic!=MC88DMAGIC) && ((x).f_magic != MC88OMAGIC)) - -#define FILHDR struct external_filehdr -#define FILHSZ 20 - - -/********************** AOUT "OPTIONAL HEADER" **********************/ - - -#define PAGEMAGIC3 0414 /* Split i&d, zero mapped */ -#define PAGEMAGICBCS 0413 - - -typedef struct -{ - char magic[2]; /* type of file */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ -} -AOUTHDR; - - -/* compute size of a header */ - -#define AOUTSZ 28 -#define AOUTHDRSZ 28 - - -/********************** SECTION HEADER **********************/ - - -struct external_scnhdr -{ - char s_name[8]; /* section name */ - char s_paddr[4]; /* physical address, aliased s_nlib */ - char s_vaddr[4]; /* virtual address */ - char s_size[4]; /* section size */ - char s_scnptr[4]; /* file ptr to raw data for section */ - char s_relptr[4]; /* file ptr to relocation */ - char s_lnnoptr[4]; /* file ptr to line numbers */ - char s_nreloc[4]; /* number of relocation entries */ - char s_nlnno[4]; /* number of line number entries*/ - char s_flags[4]; /* flags */ -}; - - -#define SCNHDR struct external_scnhdr -#define SCNHSZ 44 - -/* - * names of "special" sections - */ -#define _TEXT ".text" -#define _DATA ".data" -#define _BSS ".bss" -#define _COMMENT ".comment" - -/********************** LINE NUMBERS **********************/ - -/* 1 line number entry for every "breakpointable" source line in a section. - * Line numbers are grouped on a per function basis; first entry in a function - * grouping will have l_lnno = 0 and in place of physical address will be the - * symbol table index of the function name. - */ -struct external_lineno{ - union { - char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ - char l_paddr[4]; /* (physical) address of line number */ - } l_addr; - - char l_lnno[4]; - -}; - -#define LINENO struct external_lineno -#define LINESZ 8 - - -/********************** SYMBOLS **********************/ - -#define E_SYMNMLEN 8 /* # characters in a symbol name */ -#define E_FILNMLEN 14 /* # characters in a file name */ -#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ - -struct external_syment -{ - union { - char e_name[E_SYMNMLEN]; - struct { - char e_zeroes[4]; - char e_offset[4]; - } e; - } e; - char e_value[4]; - char e_scnum[2]; - char e_type[2]; - char e_sclass[1]; - char e_numaux[1]; - char pad2[2]; -}; - - - - -#define N_BTMASK 017 -#define N_TMASK 060 -#define N_BTSHFT 4 -#define N_TSHIFT 2 - - -/* Note that this isn't the same shape as other coffs */ -union external_auxent { - struct { - char x_tagndx[4]; /* str, un, or enum tag indx */ - /* 4 */ - union { - char x_fsize[4]; /* size of function */ - struct { - char x_lnno[4]; /* declaration line number */ - char x_size[4]; /* str/union/array size */ - } x_lnsz; - } x_misc; - - /* 12 */ - union { - struct { /* if ISFCN, tag, or .bb */ - char x_lnnoptr[4]; /* ptr to fcn line # */ - char x_endndx[4]; /* entry ndx past block end */ - } x_fcn; - struct { /* if ISARY, up to 4 dimen. */ - char x_dimen[E_DIMNUM][2]; - } x_ary; - } x_fcnary; - /* 20 */ - - } x_sym; - - union { - char x_fname[E_FILNMLEN]; - struct { - char x_zeroes[4]; - char x_offset[4]; - } x_n; - } x_file; - - struct { - char x_scnlen[4]; /* section length */ - char x_nreloc[4]; /* # relocation entries */ - char x_nlinno[4]; /* # line numbers */ - } x_scn; - - struct { - char x_tvfill[4]; /* tv fill value */ - char x_tvlen[2]; /* length of .tv */ - char x_tvran[2][2]; /* tv range */ - } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ - -}; - -#define GET_FCN_LNNOPTR(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *)ext->x_sym.x_fcnary.x_fcn.x_lnnoptr) -#define GET_FCN_ENDNDX(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_endndx) -#define PUT_FCN_LNNOPTR(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_lnnoptr) -#define PUT_FCN_ENDNDX(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_endndx) -#define GET_LNSZ_SIZE(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_size) -#define GET_LNSZ_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_lnno) -#define PUT_LNSZ_LNNO(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_lnno) -#define PUT_LNSZ_SIZE(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_size) -#define GET_SCN_SCNLEN(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_scnlen) -#define GET_SCN_NRELOC(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_nreloc) -#define GET_SCN_NLINNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_nlinno) -#define PUT_SCN_SCNLEN(abfd,in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_scn.x_scnlen) -#define PUT_SCN_NRELOC(abfd,in, ext) bfd_h_put_32(abfd, in, (bfd_byte *)ext->x_scn.x_nreloc) -#define PUT_SCN_NLINNO(abfd,in, ext) bfd_h_put_32(abfd,in, (bfd_byte *) ext->x_scn.x_nlinno) -#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno)) -#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno)); - - - -#define SYMENT struct external_syment -#define SYMESZ 20 -#define AUXENT union external_auxent -#define AUXESZ 20 - - -/********************** RELOCATION DIRECTIVES **********************/ - -struct external_reloc { - char r_vaddr[4]; - char r_symndx[4]; - char r_type[2]; - char r_offset[2]; -}; - -#define RELOC struct external_reloc -#define RELSZ 12 - -#define NO_TVNDX

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.