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

sst/core/techModels/libsim-panalyzer/target-alpha/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 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:22:27  taustin
00069  * SimpleScalar Tool Set
00070  *
00071  *
00072  * Revision 1.2  1999/12/31 18:57:49  taustin
00073  * quad_t naming conflicts removed
00074  *
00075  * Revision 1.1  1998/08/27 16:54:03  taustin
00076  * Initial revision
00077  *
00078  * Revision 1.1  1998/05/06  01:09:18  calder
00079  * Initial revision
00080  *
00081  * Revision 1.1  1997/04/16  22:13:35  taustin
00082  * Initial revision
00083  *
00084  *
00085  */
00086 
00087 /* SimpleScalar ECOFF definitions */
00088 
00089 #ifndef ECOFF_H
00090 #define ECOFF_H
00091 
00092 #include "alpha.h"
00093 
00094 #define ECOFF_EB_MAGIC          0x0160
00095 #define ECOFF_EB_OTHER          0x6001
00096 #define ECOFF_EL_MAGIC          0x0162
00097 #define ECOFF_EL_OTHER          0x6201
00098 #define ECOFF_ALPHAMAGIC        0603
00099 
00100 struct ecoff_filehdr {
00101   half_t f_magic;
00102   half_t f_nscns;
00103   sword_t f_timdat;
00104   qword_t f_symptr;
00105   sword_t f_nsyms;
00106   half_t f_opthdr;
00107   half_t f_flags;
00108 };
00109 
00110 struct ecoff_aouthdr {
00111   half_t magic;
00112   half_t vstamp;
00113   half_t bldrev;
00114   half_t padcell;
00115   qword_t tsize;
00116   qword_t dsize;
00117   qword_t bsize;
00118   qword_t entry;
00119   qword_t text_start;
00120   qword_t data_start;
00121   qword_t bss_start;
00122   sword_t gprmask;
00123   sword_t fprmask;
00124   qword_t gp_value;
00125 };
00126 
00127 struct ecoff_scnhdr {
00128   char s_name[8];
00129   qword_t s_paddr;
00130   qword_t s_vaddr;
00131   qword_t s_size;
00132   qword_t s_scnptr;
00133   qword_t s_relptr;
00134   qword_t s_lnnoptr;
00135   half_t s_nreloc;
00136   half_t s_nlnno;
00137   sword_t s_flags;
00138 };
00139 
00140 typedef struct ecoff_symhdr_t {
00141   half_t magic;
00142   half_t vstamp;
00143 
00144   sword_t ilineMax;             /* number of line number entries */
00145   sword_t idnMax;               /* max index into dense number table */
00146   sword_t ipdMax;               /* number of procedures */
00147   sword_t isymMax;              /* number of local symbols */
00148   sword_t ioptMax;              /* max index into optimization sym entries */
00149   sword_t iauxMax;              /* number of auxiliary symbol entries */
00150   sword_t issMax;               /* max index into local strings */
00151   sword_t issExtMax;            /* max index into external strings */
00152   sword_t ifdMax;               /* number of file descriptor entries */
00153   sword_t crfd;                 /* number of relative file descriptor ents */
00154   sword_t iextMax;              /* max index into external symbols */
00155   qword_t cbLine;               /* number of bytes for line number entries */
00156   qword_t cbLineOffset;         /* offset to start of line number entries*/
00157   qword_t cbDnOffset;           /* offset to start dense number table */
00158   qword_t cbPdOffset;           /* offset to procedure descriptor table */
00159   qword_t cbSymOffset;          /* offset to start of local symbols */
00160   qword_t cbOptOffset;          /* offset to optimization symbol entries */
00161   qword_t cbAuxOffset;          /* offset to start of aux symbol entries */
00162   qword_t cbSsOffset;           /* offset to start of local strings */
00163   qword_t cbSsExtOffset;        /* offset to start of external strings */
00164   qword_t cbFdOffset;           /* offset to file descriptor table */
00165   qword_t cbRfdOffset;          /* offset to relative file descriptor table */
00166   qword_t cbExtOffset;          /* offset to start of ext symbol entries */
00167 } ecoff_HDRR;
00168 
00169 #define ECOFF_magicSym 0x1992
00170 
00171 typedef struct ecoff_fdr {
00172   word_t adr;
00173   sword_t rss;
00174   sword_t issBase;
00175   sword_t cbSs;
00176   sword_t isymBase;
00177   sword_t csym;
00178   sword_t ilineBase;
00179   sword_t cline;
00180   sword_t ioptBase;
00181   sword_t copt;
00182   half_t ipdFirst;
00183   half_t cpd;
00184   sword_t iauxBase;
00185   sword_t caux;
00186   sword_t rfdBase;
00187   sword_t crfd;
00188   unsigned lang :5;
00189   unsigned fMerge :1;
00190   unsigned fReadin :1;
00191   unsigned fBigendian :1;
00192   unsigned reserved :24;
00193   sword_t cbLineOffset;
00194   sword_t cbLine;
00195 } ecoff_FDR;
00196 
00197 typedef struct ecoff_pdr {
00198   word_t adr;
00199   sword_t isym;
00200   sword_t iline;
00201   sword_t regmask;
00202   sword_t regoffset;
00203   sword_t iopt;
00204   sword_t fregmask;
00205   sword_t fregoffset;
00206   sword_t frameoffset;
00207   half_t framereg;
00208   half_t pcreg;
00209   sword_t lnLow;
00210   sword_t lnHigh;
00211   sword_t cbLineOffset;
00212 } ecoff_PDR;
00213 
00214 typedef struct ecoff_SYMR {
00215   qword_t value;
00216   sword_t iss;
00217   unsigned st :6;
00218   unsigned sc :5;
00219   unsigned reserved :1;
00220   unsigned index :20;
00221 } ecoff_SYMR;
00222 
00223 typedef struct ecoff_EXTR {
00224   ecoff_SYMR asym;
00225   sword_t ifd;
00226   sword_t reserved;
00227 } ecoff_EXTR;
00228 
00229 #define ECOFF_R_SN_TEXT         1
00230 #define ECOFF_R_SN_RDATA        2
00231 #define ECOFF_R_SN_DATA         3
00232 #define ECOFF_R_SN_SDATA        4
00233 #define ECOFF_R_SN_SBSS         5
00234 #define ECOFF_R_SN_BSS          6
00235 
00236 #define ECOFF_STYP_TEXT         0x0020
00237 #define ECOFF_STYP_RDATA        0x0100
00238 #define ECOFF_STYP_DATA         0x0040
00239 #define ECOFF_STYP_SDATA        0x0200
00240 #define ECOFF_STYP_SBSS         0x0400
00241 #define ECOFF_STYP_BSS          0x0080
00242 #define ECOFF_STYP_INIT         0x80000000      /* sect only contains the text
00243                                                    insts for the .init sec. */
00244 #define ECOFF_STYP_FINI         0x01000000      /* insts for .fini */
00245 #define ECOFF_STYP_RCONST       0x02200000      /* overloads with reginfo */
00246 #define ECOFF_STYP_LITA         0x04000000      /* addr literals only        */
00247 #define ECOFF_STYP_LIT8         0x08000000      /* lit pool for 8 byte lits */
00248 #define ECOFF_STYP_LIT4         0x10000000      /* lit pool for 4 byte lits */
00249 #define ECOFF_STYP_XDATA        0x02400000      /* exception sections */
00250 #define ECOFF_STYP_PDATA        0x02800000      /* exception sections */
00251 
00252 #define ECOFF_stNil             0
00253 #define ECOFF_stGlobal          1
00254 #define ECOFF_stStatic          2
00255 #define ECOFF_stParam           3
00256 #define ECOFF_stLocal           4
00257 #define ECOFF_stLabel           5
00258 #define ECOFF_stProc            6
00259 #define ECOFF_stBlock           7
00260 #define ECOFF_stEnd             8
00261 #define ECOFF_stMember          9
00262 #define ECOFF_stTypedef         10
00263 #define ECOFF_stFile            11
00264 #define ECOFF_stRegReloc        12
00265 #define ECOFF_stForward         13
00266 #define ECOFF_stStaticProc      14
00267 #define ECOFF_stConstant        15
00268 
00269 #endif /* ECOFF_H */

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