00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
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