"I am a person who works hard and plays hard."

Yuan Wei
Second Year Graduate Student Department of Computer Science
University of Virginia Charlottesville, VA 22903
Email: yw3f@cs.virginia.edu


Source Code Analysis

Main Page   Compound List   File List   Compound Members   File Members  

ecoff.h

Go to the documentation of this file.
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 2000/05/26 15:21:54 taustin Exp $
00053  *
00054  * $Log: ecoff.h,v $
00055  * Revision 1.1.1.1  2000/05/26 15:21:54  taustin
00056  * SimpleScalar Tool Set
00057  *
00058  *
00059  * Revision 1.1  1998/08/27 16:57:15  taustin
00060  * Initial revision
00061  *
00062  * Revision 1.1  1997/04/16  22:13:35  taustin
00063  * Initial revision
00064  *
00065  *
00066  */
00067 
00068 /* SimpleScalar ECOFF definitions */
00069 
00070 #ifndef ECOFF_H
00071 #define ECOFF_H
00072 
00073 #define ECOFF_EB_MAGIC          0x0160
00074 #define ECOFF_EB_OTHER          0x6001
00075 #define ECOFF_EL_MAGIC          0x0162
00076 #define ECOFF_EL_OTHER          0x6201
00077 #define ECOFF_ALPHAMAGIC        0603
00078 
00079 struct ecoff_filehdr {
00080   half_t f_magic;
00081   half_t f_nscns;
00082   sword_t f_timdat;
00083   sword_t f_symptr;
00084   sword_t f_nsyms;
00085   half_t f_opthdr;
00086   half_t f_flags;
00087 };
00088 
00089 struct ecoff_aouthdr {
00090   shalf_t magic;
00091   shalf_t vstamp;
00092   sword_t tsize;
00093   sword_t dsize;
00094   sword_t bsize;
00095   sword_t entry;
00096   sword_t text_start;
00097   sword_t data_start;
00098   sword_t bss_start;
00099   sword_t gprmask;
00100   sword_t cprmask[4];
00101   sword_t gp_value;
00102 };
00103 
00104 struct ecoff_scnhdr {
00105   char s_name[8];
00106   sword_t s_paddr;
00107   sword_t s_vaddr;
00108   sword_t s_size;
00109   sword_t s_scnptr;
00110   sword_t s_relptr;
00111   sword_t s_lnnoptr;
00112   half_t s_nreloc;
00113   half_t s_nlnno;
00114   sword_t s_flags;
00115 };
00116 
00117 typedef struct ecoff_symhdr_t {
00118   shalf_t magic;
00119   shalf_t vstamp;
00120   sword_t ilineMax;
00121   sword_t cbLine;
00122   sword_t cbLineOffset;
00123   sword_t idnMax;
00124   sword_t cbDnOffset;
00125   sword_t ipdMax;
00126   sword_t cbPdOffset;
00127   sword_t isymMax;
00128   sword_t cbSymOffset;
00129   sword_t ioptMax;
00130   sword_t cbOptOffset;
00131   sword_t iauxMax;
00132   sword_t cbAuxOffset;
00133   sword_t issMax;
00134   sword_t cbSsOffset;
00135   sword_t issExtMax;
00136   sword_t cbSsExtOffset;
00137   sword_t ifdMax;
00138   sword_t cbFdOffset;
00139   sword_t crfd;
00140   sword_t cbRfdOffset;
00141   sword_t iextMax;
00142   sword_t cbExtOffset;
00143 } ecoff_HDRR;
00144 
00145 #define ECOFF_magicSym 0x7009
00146 
00147 typedef struct ecoff_fdr {
00148   word_t adr;
00149   sword_t rss;
00150   sword_t issBase;
00151   sword_t cbSs;
00152   sword_t isymBase;
00153   sword_t csym;
00154   sword_t ilineBase;
00155   sword_t cline;
00156   sword_t ioptBase;
00157   sword_t copt;
00158   half_t ipdFirst;
00159   half_t cpd;
00160   sword_t iauxBase;
00161   sword_t caux;
00162   sword_t rfdBase;
00163   sword_t crfd;
00164   unsigned lang :5;
00165   unsigned fMerge :1;
00166   unsigned fReadin :1;
00167   unsigned fBigendian :1;
00168   unsigned reserved :24;
00169   sword_t cbLineOffset;
00170   sword_t cbLine;
00171 } ecoff_FDR;
00172 
00173 typedef struct ecoff_pdr {
00174   word_t adr;
00175   sword_t isym;
00176   sword_t iline;
00177   sword_t regmask;
00178   sword_t regoffset;
00179   sword_t iopt;
00180   sword_t fregmask;
00181   sword_t fregoffset;
00182   sword_t frameoffset;
00183   shalf_t framereg;
00184   shalf_t pcreg;
00185   sword_t lnLow;
00186   sword_t lnHigh;
00187   sword_t cbLineOffset;
00188 } ecoff_PDR;
00189 
00190 typedef struct ecoff_SYMR {
00191   sword_t iss;
00192   sword_t value;
00193   unsigned st :6;
00194   unsigned sc :5;
00195   unsigned reserved :1;
00196   unsigned index :20;
00197 } ecoff_SYMR;
00198 
00199 typedef struct ecoff_EXTR {
00200   shalf_t reserved;
00201   shalf_t ifd;
00202   ecoff_SYMR asym;
00203 } ecoff_EXTR;
00204 
00205 #define ECOFF_R_SN_TEXT         1
00206 #define ECOFF_R_SN_RDATA        2
00207 #define ECOFF_R_SN_DATA         3
00208 #define ECOFF_R_SN_SDATA        4
00209 #define ECOFF_R_SN_SBSS         5
00210 #define ECOFF_R_SN_BSS          6
00211 
00212 #define ECOFF_STYP_TEXT         0x0020
00213 #define ECOFF_STYP_RDATA        0x0100
00214 #define ECOFF_STYP_DATA         0x0040
00215 #define ECOFF_STYP_SDATA        0x0200
00216 #define ECOFF_STYP_SBSS         0x0400
00217 #define ECOFF_STYP_BSS          0x0080
00218 
00219 #define ECOFF_stNil             0
00220 #define ECOFF_stGlobal          1
00221 #define ECOFF_stStatic          2
00222 #define ECOFF_stParam           3
00223 #define ECOFF_stLocal           4
00224 #define ECOFF_stLabel           5
00225 #define ECOFF_stProc            6
00226 #define ECOFF_stBlock           7
00227 #define ECOFF_stEnd             8
00228 #define ECOFF_stMember          9
00229 #define ECOFF_stTypedef         10
00230 #define ECOFF_stFile            11
00231 #define ECOFF_stRegReloc        12
00232 #define ECOFF_stForward         13
00233 #define ECOFF_stStaticProc      14
00234 #define ECOFF_stConstant        15
00235 
00236 #endif /* ECOFF_H */


UVa CS Department of Computer Science
School of Engineering, University of Virginia
151 Engineer's Way, P.O. Box 400740
Charlottesville, Virginia 22904-4740

(434) 982-2200  Fax: (434) 982-2214