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
00084
00085
00086
00087
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;
00145 sword_t idnMax;
00146 sword_t ipdMax;
00147 sword_t isymMax;
00148 sword_t ioptMax;
00149 sword_t iauxMax;
00150 sword_t issMax;
00151 sword_t issExtMax;
00152 sword_t ifdMax;
00153 sword_t crfd;
00154 sword_t iextMax;
00155 qword_t cbLine;
00156 qword_t cbLineOffset;
00157 qword_t cbDnOffset;
00158 qword_t cbPdOffset;
00159 qword_t cbSymOffset;
00160 qword_t cbOptOffset;
00161 qword_t cbAuxOffset;
00162 qword_t cbSsOffset;
00163 qword_t cbSsExtOffset;
00164 qword_t cbFdOffset;
00165 qword_t cbRfdOffset;
00166 qword_t cbExtOffset;
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
00243
00244 #define ECOFF_STYP_FINI 0x01000000
00245 #define ECOFF_STYP_RCONST 0x02200000
00246 #define ECOFF_STYP_LITA 0x04000000
00247 #define ECOFF_STYP_LIT8 0x08000000
00248 #define ECOFF_STYP_LIT4 0x10000000
00249 #define ECOFF_STYP_XDATA 0x02400000
00250 #define ECOFF_STYP_PDATA 0x02800000
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