• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

sst/core/techModels/libsim-panalyzer/target-pisa/ecoff.h

00001 /*
00002  * ecoff.h - SimpleScalar ECOFF definitions
00003  *
00004  * This file is a part of the SimpleScalar tool suite written by
00005  * Todd M. Austin as a part of the Multiscalar Research Project.
00006  *  
00007  * The tool suite is currently maintained by Doug Burger and Todd M. Austin.
00008  * 
00009  * Copyright (C) 1994, 1995, 1996, 1997, 1998 by Todd M. Austin
00010  *
00011  * This source file is distributed "as is" in the hope that it will be
00012  * useful.  The tool set comes with no warranty, and no author or
00013  * distributor accepts any responsibility for the consequences of its
00014  * use. 
00015  * 
00016  * Everyone is granted permission to copy, modify and redistribute
00017  * this tool set under the following conditions:
00018  * 
00019  *    This source code is distributed for non-commercial use only. 
00020  *    Please contact the maintainer for restrictions applying to 
00021  *    commercial use.
00022  *
00023  *    Permission is granted to anyone to make or distribute copies
00024  *    of this source code, either as received or modified, in any
00025  *    medium, provided that all copyright notices, permission and
00026  *    nonwarranty notices are preserved, and that the distributor
00027  *    grants the recipient permission for further redistribution as
00028  *    permitted by this document.
00029  *
00030  *    Permission is granted to distribute this file in compiled
00031  *    or executable form under the same conditions that apply for
00032  *    source code, provided that either:
00033  *
00034  *    A. it is accompanied by the corresponding machine-readable
00035  *       source code,
00036  *    B. it is accompanied by a written offer, with no time limit,
00037  *       to give anyone a machine-readable copy of the corresponding
00038  *       source code in return for reimbursement of the cost of
00039  *       distribution.  This written offer must permit verbatim
00040  *       duplication by anyone, or
00041  *    C. it is distributed by someone who received only the
00042  *       executable form, and is accompanied by a copy of the
00043  *       written offer of source code that they received concurrently.
00044  *
00045  * In other words, you are welcome to use, share and improve this
00046  * source file.  You are forbidden to forbid anyone else to use, share
00047  * and improve what you give them.
00048  *
00049  * INTERNET: dburger@cs.wisc.edu
00050  * US Mail:  1210 W. Dayton Street, Madison, WI 53706
00051  *
00052  * $Id: ecoff.h,v 1.1.1.1 2003/09/18 00:57:55 panalyzer Exp $
00053  *
00054  * $Log: ecoff.h,v $
00055  * Revision 1.1.1.1  2003/09/18 00:57:55  panalyzer
00056  *
00057  *
00058  * Revision 1.1.1.1  2003/09/18 00:18:45  panalyzer
00059  *
00060  *
00061  * Revision 1.1.1.1  2003/09/16 18:48:14  gdm
00062  *
00063  *
00064  * Revision 1.1.1.1  2000/11/29 14:53:54  cu-cs
00065  * Grand unification of arm sources.
00066  *
00067  *
00068  * Revision 1.1.1.1  2000/05/26 15:21:54  taustin
00069  * SimpleScalar Tool Set
00070  *
00071  *
00072  * Revision 1.1  1998/08/27 16:57:15  taustin
00073  * Initial revision
00074  *
00075  * Revision 1.1  1997/04/16  22:13:35  taustin
00076  * Initial revision
00077  *
00078  *
00079  */
00080 
00081 /* SimpleScalar ECOFF definitions */
00082 
00083 #ifndef ECOFF_H
00084 #define ECOFF_H
00085 
00086 #define ECOFF_EB_MAGIC          0x0160
00087 #define ECOFF_EB_OTHER          0x6001
00088 #define ECOFF_EL_MAGIC          0x0162
00089 #define ECOFF_EL_OTHER          0x6201
00090 #define ECOFF_ALPHAMAGIC        0603
00091 
00092 struct ecoff_filehdr {
00093   half_t f_magic;
00094   half_t f_nscns;
00095   sword_t f_timdat;
00096   sword_t f_symptr;
00097   sword_t f_nsyms;
00098   half_t f_opthdr;
00099   half_t f_flags;
00100 };
00101 
00102 struct ecoff_aouthdr {
00103   shalf_t magic;
00104   shalf_t vstamp;
00105   sword_t tsize;
00106   sword_t dsize;
00107   sword_t bsize;
00108   sword_t entry;
00109   sword_t text_start;
00110   sword_t data_start;
00111   sword_t bss_start;
00112   sword_t gprmask;
00113   sword_t cprmask[4];
00114   sword_t gp_value;
00115 };
00116 
00117 struct ecoff_scnhdr {
00118   char s_name[8];
00119   sword_t s_paddr;
00120   sword_t s_vaddr;
00121   sword_t s_size;
00122   sword_t s_scnptr;
00123   sword_t s_relptr;
00124   sword_t s_lnnoptr;
00125   half_t s_nreloc;
00126   half_t s_nlnno;
00127   sword_t s_flags;
00128 };
00129 
00130 typedef struct ecoff_symhdr_t {
00131   shalf_t magic;
00132   shalf_t vstamp;
00133   sword_t ilineMax;
00134   sword_t cbLine;
00135   sword_t cbLineOffset;
00136   sword_t idnMax;
00137   sword_t cbDnOffset;
00138   sword_t ipdMax;
00139   sword_t cbPdOffset;
00140   sword_t isymMax;
00141   sword_t cbSymOffset;
00142   sword_t ioptMax;
00143   sword_t cbOptOffset;
00144   sword_t iauxMax;
00145   sword_t cbAuxOffset;
00146   sword_t issMax;
00147   sword_t cbSsOffset;
00148   sword_t issExtMax;
00149   sword_t cbSsExtOffset;
00150   sword_t ifdMax;
00151   sword_t cbFdOffset;
00152   sword_t crfd;
00153   sword_t cbRfdOffset;
00154   sword_t iextMax;
00155   sword_t cbExtOffset;
00156 } ecoff_HDRR;
00157 
00158 #define ECOFF_magicSym 0x7009
00159 
00160 typedef struct ecoff_fdr {
00161   word_t adr;
00162   sword_t rss;
00163   sword_t issBase;
00164   sword_t cbSs;
00165   sword_t isymBase;
00166   sword_t csym;
00167   sword_t ilineBase;
00168   sword_t cline;
00169   sword_t ioptBase;
00170   sword_t copt;
00171   half_t ipdFirst;
00172   half_t cpd;
00173   sword_t iauxBase;
00174   sword_t caux;
00175   sword_t rfdBase;
00176   sword_t crfd;
00177   unsigned lang :5;
00178   unsigned fMerge :1;
00179   unsigned fReadin :1;
00180   unsigned fBigendian :1;
00181   unsigned reserved :24;
00182   sword_t cbLineOffset;
00183   sword_t cbLine;
00184 } ecoff_FDR;
00185 
00186 typedef struct ecoff_pdr {
00187   word_t adr;
00188   sword_t isym;
00189   sword_t iline;
00190   sword_t regmask;
00191   sword_t regoffset;
00192   sword_t iopt;
00193   sword_t fregmask;
00194   sword_t fregoffset;
00195   sword_t frameoffset;
00196   shalf_t framereg;
00197   shalf_t pcreg;
00198   sword_t lnLow;
00199   sword_t lnHigh;
00200   sword_t cbLineOffset;
00201 } ecoff_PDR;
00202 
00203 typedef struct ecoff_SYMR {
00204   sword_t iss;
00205   sword_t value;
00206   unsigned st :6;
00207   unsigned sc :5;
00208   unsigned reserved :1;
00209   unsigned index :20;
00210 } ecoff_SYMR;
00211 
00212 typedef struct ecoff_EXTR {
00213   shalf_t reserved;
00214   shalf_t ifd;
00215   ecoff_SYMR asym;
00216 } ecoff_EXTR;
00217 
00218 #define ECOFF_R_SN_TEXT         1
00219 #define ECOFF_R_SN_RDATA        2
00220 #define ECOFF_R_SN_DATA         3
00221 #define ECOFF_R_SN_SDATA        4
00222 #define ECOFF_R_SN_SBSS         5
00223 #define ECOFF_R_SN_BSS          6
00224 
00225 #define ECOFF_STYP_TEXT         0x0020
00226 #define ECOFF_STYP_RDATA        0x0100
00227 #define ECOFF_STYP_DATA         0x0040
00228 #define ECOFF_STYP_SDATA        0x0200
00229 #define ECOFF_STYP_SBSS         0x0400
00230 #define ECOFF_STYP_BSS          0x0080
00231 
00232 #define ECOFF_stNil             0
00233 #define ECOFF_stGlobal          1
00234 #define ECOFF_stStatic          2
00235 #define ECOFF_stParam           3
00236 #define ECOFF_stLocal           4
00237 #define ECOFF_stLabel           5
00238 #define ECOFF_stProc            6
00239 #define ECOFF_stBlock           7
00240 #define ECOFF_stEnd             8
00241 #define ECOFF_stMember          9
00242 #define ECOFF_stTypedef         10
00243 #define ECOFF_stFile            11
00244 #define ECOFF_stRegReloc        12
00245 #define ECOFF_stForward         13
00246 #define ECOFF_stStaticProc      14
00247 #define ECOFF_stConstant        15
00248 
00249 #endif /* ECOFF_H */

Generated on Fri Oct 22 2010 11:02:21 for SST by  doxygen 1.7.1