1*2159047fSniklas /* Declarations of internal format of MIPS ECOFF symbols. 2*2159047fSniklas Originally contributed by MIPS Computer Systems and Third Eye Software. 3*2159047fSniklas Changes contributed by Cygnus Support are in the public domain. 4*2159047fSniklas 5*2159047fSniklas This file is just aggregated with the files that make up the GNU 6*2159047fSniklas release; it is not considered part of GAS, GDB, or other GNU 7*2159047fSniklas programs. */ 8*2159047fSniklas 9*2159047fSniklas /* 10*2159047fSniklas * |-----------------------------------------------------------| 11*2159047fSniklas * | Copyright (c) 1992, 1991, 1990 MIPS Computer Systems, Inc.| 12*2159047fSniklas * | MIPS Computer Systems, Inc. grants reproduction and use | 13*2159047fSniklas * | rights to all parties, PROVIDED that this comment is | 14*2159047fSniklas * | maintained in the copy. | 15*2159047fSniklas * |-----------------------------------------------------------| 16*2159047fSniklas */ 17*2159047fSniklas #ifndef _SYM_H 18*2159047fSniklas #define _SYM_H 19*2159047fSniklas 20*2159047fSniklas /* (C) Copyright 1984 by Third Eye Software, Inc. 21*2159047fSniklas * 22*2159047fSniklas * Third Eye Software, Inc. grants reproduction and use rights to 23*2159047fSniklas * all parties, PROVIDED that this comment is maintained in the copy. 24*2159047fSniklas * 25*2159047fSniklas * Third Eye makes no claims about the applicability of this 26*2159047fSniklas * symbol table to a particular use. 27*2159047fSniklas */ 28*2159047fSniklas 29*2159047fSniklas /* 30*2159047fSniklas * This file contains the definition of the Third Eye Symbol Table. 31*2159047fSniklas * 32*2159047fSniklas * Symbols are assumed to be in 'encounter order' - i.e. the order that 33*2159047fSniklas * the things they represent were encountered by the compiler/assembler/loader. 34*2159047fSniklas * EXCEPT for globals! These are assumed to be bunched together, 35*2159047fSniklas * probably right after the last 'normal' symbol. Globals ARE sorted 36*2159047fSniklas * in ascending order. 37*2159047fSniklas * 38*2159047fSniklas * ----------------------------------------------------------------------- 39*2159047fSniklas * A brief word about Third Eye naming/use conventions: 40*2159047fSniklas * 41*2159047fSniklas * All arrays and index's are 0 based. 42*2159047fSniklas * All "ifooMax" values are the highest legal value PLUS ONE. This makes 43*2159047fSniklas * them good for allocating arrays, etc. All checks are "ifoo < ifooMax". 44*2159047fSniklas * 45*2159047fSniklas * "isym" Index into the SYMbol table. 46*2159047fSniklas * "ipd" Index into the Procedure Descriptor array. 47*2159047fSniklas * "ifd" Index into the File Descriptor array. 48*2159047fSniklas * "iss" Index into String Space. 49*2159047fSniklas * "cb" Count of Bytes. 50*2159047fSniklas * "rgPd" array whose domain is "0..ipdMax-1" and RanGe is PDR. 51*2159047fSniklas * "rgFd" array whose domain is "0..ifdMax-1" and RanGe is FDR. 52*2159047fSniklas */ 53*2159047fSniklas 54*2159047fSniklas 55*2159047fSniklas /* 56*2159047fSniklas * Symbolic Header (HDR) structure. 57*2159047fSniklas * As long as all the pointers are set correctly, 58*2159047fSniklas * we don't care WHAT order the various sections come out in! 59*2159047fSniklas * 60*2159047fSniklas * A file produced solely for the use of CDB will probably NOT have 61*2159047fSniklas * any instructions or data areas in it, as these are available 62*2159047fSniklas * in the original. 63*2159047fSniklas */ 64*2159047fSniklas 65*2159047fSniklas typedef struct { 66*2159047fSniklas short magic; /* to verify validity of the table */ 67*2159047fSniklas short vstamp; /* version stamp */ 68*2159047fSniklas long ilineMax; /* number of line number entries */ 69*2159047fSniklas bfd_vma cbLine; /* number of bytes for line number entries */ 70*2159047fSniklas bfd_vma cbLineOffset; /* offset to start of line number entries*/ 71*2159047fSniklas long idnMax; /* max index into dense number table */ 72*2159047fSniklas bfd_vma cbDnOffset; /* offset to start dense number table */ 73*2159047fSniklas long ipdMax; /* number of procedures */ 74*2159047fSniklas bfd_vma cbPdOffset; /* offset to procedure descriptor table */ 75*2159047fSniklas long isymMax; /* number of local symbols */ 76*2159047fSniklas bfd_vma cbSymOffset; /* offset to start of local symbols*/ 77*2159047fSniklas long ioptMax; /* max index into optimization symbol entries */ 78*2159047fSniklas bfd_vma cbOptOffset; /* offset to optimization symbol entries */ 79*2159047fSniklas long iauxMax; /* number of auxillary symbol entries */ 80*2159047fSniklas bfd_vma cbAuxOffset; /* offset to start of auxillary symbol entries*/ 81*2159047fSniklas long issMax; /* max index into local strings */ 82*2159047fSniklas bfd_vma cbSsOffset; /* offset to start of local strings */ 83*2159047fSniklas long issExtMax; /* max index into external strings */ 84*2159047fSniklas bfd_vma cbSsExtOffset; /* offset to start of external strings */ 85*2159047fSniklas long ifdMax; /* number of file descriptor entries */ 86*2159047fSniklas bfd_vma cbFdOffset; /* offset to file descriptor table */ 87*2159047fSniklas long crfd; /* number of relative file descriptor entries */ 88*2159047fSniklas bfd_vma cbRfdOffset; /* offset to relative file descriptor table */ 89*2159047fSniklas long iextMax; /* max index into external symbols */ 90*2159047fSniklas bfd_vma cbExtOffset; /* offset to start of external symbol entries*/ 91*2159047fSniklas /* If you add machine dependent fields, add them here */ 92*2159047fSniklas } HDRR, *pHDRR; 93*2159047fSniklas #define cbHDRR sizeof(HDRR) 94*2159047fSniklas #define hdrNil ((pHDRR)0) 95*2159047fSniklas 96*2159047fSniklas /* 97*2159047fSniklas * The FDR and PDR structures speed mapping of address <-> name. 98*2159047fSniklas * They are sorted in ascending memory order and are kept in 99*2159047fSniklas * memory by CDB at runtime. 100*2159047fSniklas */ 101*2159047fSniklas 102*2159047fSniklas /* 103*2159047fSniklas * File Descriptor 104*2159047fSniklas * 105*2159047fSniklas * There is one of these for EVERY FILE, whether compiled with 106*2159047fSniklas * full debugging symbols or not. The name of a file should be 107*2159047fSniklas * the path name given to the compiler. This allows the user 108*2159047fSniklas * to simply specify the names of the directories where the COMPILES 109*2159047fSniklas * were done, and we will be able to find their files. 110*2159047fSniklas * A field whose comment starts with "R - " indicates that it will be 111*2159047fSniklas * setup at runtime. 112*2159047fSniklas */ 113*2159047fSniklas typedef struct fdr { 114*2159047fSniklas bfd_vma adr; /* memory address of beginning of file */ 115*2159047fSniklas long rss; /* file name (of source, if known) */ 116*2159047fSniklas long issBase; /* file's string space */ 117*2159047fSniklas bfd_vma cbSs; /* number of bytes in the ss */ 118*2159047fSniklas long isymBase; /* beginning of symbols */ 119*2159047fSniklas long csym; /* count file's of symbols */ 120*2159047fSniklas long ilineBase; /* file's line symbols */ 121*2159047fSniklas long cline; /* count of file's line symbols */ 122*2159047fSniklas long ioptBase; /* file's optimization entries */ 123*2159047fSniklas long copt; /* count of file's optimization entries */ 124*2159047fSniklas unsigned short ipdFirst;/* start of procedures for this file */ 125*2159047fSniklas short cpd; /* count of procedures for this file */ 126*2159047fSniklas long iauxBase; /* file's auxiliary entries */ 127*2159047fSniklas long caux; /* count of file's auxiliary entries */ 128*2159047fSniklas long rfdBase; /* index into the file indirect table */ 129*2159047fSniklas long crfd; /* count file indirect entries */ 130*2159047fSniklas unsigned lang: 5; /* language for this file */ 131*2159047fSniklas unsigned fMerge : 1; /* whether this file can be merged */ 132*2159047fSniklas unsigned fReadin : 1; /* true if it was read in (not just created) */ 133*2159047fSniklas unsigned fBigendian : 1;/* if set, was compiled on big endian machine */ 134*2159047fSniklas /* aux's will be in compile host's sex */ 135*2159047fSniklas unsigned glevel : 2; /* level this file was compiled with */ 136*2159047fSniklas unsigned reserved : 22; /* reserved for future use */ 137*2159047fSniklas bfd_vma cbLineOffset; /* byte offset from header for this file ln's */ 138*2159047fSniklas bfd_vma cbLine; /* size of lines for this file */ 139*2159047fSniklas } FDR, *pFDR; 140*2159047fSniklas #define cbFDR sizeof(FDR) 141*2159047fSniklas #define fdNil ((pFDR)0) 142*2159047fSniklas #define ifdNil -1 143*2159047fSniklas #define ifdTemp 0 144*2159047fSniklas #define ilnNil -1 145*2159047fSniklas 146*2159047fSniklas 147*2159047fSniklas /* 148*2159047fSniklas * Procedure Descriptor 149*2159047fSniklas * 150*2159047fSniklas * There is one of these for EVERY TEXT LABEL. 151*2159047fSniklas * If a procedure is in a file with full symbols, then isym 152*2159047fSniklas * will point to the PROC symbols, else it will point to the 153*2159047fSniklas * global symbol for the label. 154*2159047fSniklas */ 155*2159047fSniklas 156*2159047fSniklas typedef struct pdr { 157*2159047fSniklas bfd_vma adr; /* memory address of start of procedure */ 158*2159047fSniklas long isym; /* start of local symbol entries */ 159*2159047fSniklas long iline; /* start of line number entries*/ 160*2159047fSniklas long regmask; /* save register mask */ 161*2159047fSniklas long regoffset; /* save register offset */ 162*2159047fSniklas long iopt; /* start of optimization symbol entries*/ 163*2159047fSniklas long fregmask; /* save floating point register mask */ 164*2159047fSniklas long fregoffset; /* save floating point register offset */ 165*2159047fSniklas long frameoffset; /* frame size */ 166*2159047fSniklas short framereg; /* frame pointer register */ 167*2159047fSniklas short pcreg; /* offset or reg of return pc */ 168*2159047fSniklas long lnLow; /* lowest line in the procedure */ 169*2159047fSniklas long lnHigh; /* highest line in the procedure */ 170*2159047fSniklas bfd_vma cbLineOffset; /* byte offset for this procedure from the fd base */ 171*2159047fSniklas /* These fields are new for 64 bit ECOFF. */ 172*2159047fSniklas unsigned gp_prologue : 8; /* byte size of GP prologue */ 173*2159047fSniklas unsigned gp_used : 1; /* true if the procedure uses GP */ 174*2159047fSniklas unsigned reg_frame : 1; /* true if register frame procedure */ 175*2159047fSniklas unsigned prof : 1; /* true if compiled with -pg */ 176*2159047fSniklas unsigned reserved : 13; /* reserved: must be zero */ 177*2159047fSniklas unsigned localoff : 8; /* offset of local variables from vfp */ 178*2159047fSniklas } PDR, *pPDR; 179*2159047fSniklas #define cbPDR sizeof(PDR) 180*2159047fSniklas #define pdNil ((pPDR) 0) 181*2159047fSniklas #define ipdNil -1 182*2159047fSniklas 183*2159047fSniklas /* 184*2159047fSniklas * The structure of the runtime procedure descriptor created by the loader 185*2159047fSniklas * for use by the static exception system. 186*2159047fSniklas */ 187*2159047fSniklas /* 188*2159047fSniklas * If 0'd out because exception_info chokes Visual C++ and because there 189*2159047fSniklas * don't seem to be any references to this structure elsewhere in gdb. 190*2159047fSniklas */ 191*2159047fSniklas #if 0 192*2159047fSniklas typedef struct runtime_pdr { 193*2159047fSniklas bfd_vma adr; /* memory address of start of procedure */ 194*2159047fSniklas long regmask; /* save register mask */ 195*2159047fSniklas long regoffset; /* save register offset */ 196*2159047fSniklas long fregmask; /* save floating point register mask */ 197*2159047fSniklas long fregoffset; /* save floating point register offset */ 198*2159047fSniklas long frameoffset; /* frame size */ 199*2159047fSniklas short framereg; /* frame pointer register */ 200*2159047fSniklas short pcreg; /* offset or reg of return pc */ 201*2159047fSniklas long irpss; /* index into the runtime string table */ 202*2159047fSniklas long reserved; 203*2159047fSniklas struct exception_info *exception_info;/* pointer to exception array */ 204*2159047fSniklas } RPDR, *pRPDR; 205*2159047fSniklas #define cbRPDR sizeof(RPDR) 206*2159047fSniklas #define rpdNil ((pRPDR) 0) 207*2159047fSniklas #endif 208*2159047fSniklas 209*2159047fSniklas /* 210*2159047fSniklas * Line Numbers 211*2159047fSniklas * 212*2159047fSniklas * Line Numbers are segregated from the normal symbols because they 213*2159047fSniklas * are [1] smaller , [2] are of no interest to your 214*2159047fSniklas * average loader, and [3] are never needed in the middle of normal 215*2159047fSniklas * scanning and therefore slow things down. 216*2159047fSniklas * 217*2159047fSniklas * By definition, the first LINER for any given procedure will have 218*2159047fSniklas * the first line of a procedure and represent the first address. 219*2159047fSniklas */ 220*2159047fSniklas 221*2159047fSniklas typedef long LINER, *pLINER; 222*2159047fSniklas #define lineNil ((pLINER)0) 223*2159047fSniklas #define cbLINER sizeof(LINER) 224*2159047fSniklas #define ilineNil -1 225*2159047fSniklas 226*2159047fSniklas 227*2159047fSniklas 228*2159047fSniklas /* 229*2159047fSniklas * The Symbol Structure (GFW, to those who Know!) 230*2159047fSniklas */ 231*2159047fSniklas 232*2159047fSniklas typedef struct { 233*2159047fSniklas long iss; /* index into String Space of name */ 234*2159047fSniklas bfd_vma value; /* value of symbol */ 235*2159047fSniklas unsigned st : 6; /* symbol type */ 236*2159047fSniklas unsigned sc : 5; /* storage class - text, data, etc */ 237*2159047fSniklas unsigned reserved : 1; /* reserved */ 238*2159047fSniklas unsigned index : 20; /* index into sym/aux table */ 239*2159047fSniklas } SYMR, *pSYMR; 240*2159047fSniklas #define symNil ((pSYMR)0) 241*2159047fSniklas #define cbSYMR sizeof(SYMR) 242*2159047fSniklas #define isymNil -1 243*2159047fSniklas #define indexNil 0xfffff 244*2159047fSniklas #define issNil -1 245*2159047fSniklas #define issNull 0 246*2159047fSniklas 247*2159047fSniklas 248*2159047fSniklas /* The following converts a memory resident string to an iss. 249*2159047fSniklas * This hack is recognized in SbFIss, in sym.c of the debugger. 250*2159047fSniklas */ 251*2159047fSniklas #define IssFSb(sb) (0x80000000 | ((unsigned long)(sb))) 252*2159047fSniklas 253*2159047fSniklas /* E X T E R N A L S Y M B O L R E C O R D 254*2159047fSniklas * 255*2159047fSniklas * Same as the SYMR except it contains file context to determine where 256*2159047fSniklas * the index is. 257*2159047fSniklas */ 258*2159047fSniklas typedef struct ecoff_extr { 259*2159047fSniklas unsigned jmptbl:1; /* symbol is a jump table entry for shlibs */ 260*2159047fSniklas unsigned cobol_main:1; /* symbol is a cobol main procedure */ 261*2159047fSniklas unsigned weakext:1; /* symbol is weak external */ 262*2159047fSniklas unsigned reserved:13; /* reserved for future use */ 263*2159047fSniklas int ifd; /* where the iss and index fields point into */ 264*2159047fSniklas SYMR asym; /* symbol for the external */ 265*2159047fSniklas } EXTR, *pEXTR; 266*2159047fSniklas #define extNil ((pEXTR)0) 267*2159047fSniklas #define cbEXTR sizeof(EXTR) 268*2159047fSniklas 269*2159047fSniklas 270*2159047fSniklas /* A U X I L L A R Y T Y P E I N F O R M A T I O N */ 271*2159047fSniklas 272*2159047fSniklas /* 273*2159047fSniklas * Type Information Record 274*2159047fSniklas */ 275*2159047fSniklas typedef struct { 276*2159047fSniklas unsigned fBitfield : 1; /* set if bit width is specified */ 277*2159047fSniklas unsigned continued : 1; /* indicates additional TQ info in next AUX */ 278*2159047fSniklas unsigned bt : 6; /* basic type */ 279*2159047fSniklas unsigned tq4 : 4; 280*2159047fSniklas unsigned tq5 : 4; 281*2159047fSniklas /* ---- 16 bit boundary ---- */ 282*2159047fSniklas unsigned tq0 : 4; 283*2159047fSniklas unsigned tq1 : 4; /* 6 type qualifiers - tqPtr, etc. */ 284*2159047fSniklas unsigned tq2 : 4; 285*2159047fSniklas unsigned tq3 : 4; 286*2159047fSniklas } TIR, *pTIR; 287*2159047fSniklas #define cbTIR sizeof(TIR) 288*2159047fSniklas #define tiNil ((pTIR)0) 289*2159047fSniklas #define itqMax 6 290*2159047fSniklas 291*2159047fSniklas /* 292*2159047fSniklas * Relative symbol record 293*2159047fSniklas * 294*2159047fSniklas * If the rfd field is 4095, the index field indexes into the global symbol 295*2159047fSniklas * table. 296*2159047fSniklas */ 297*2159047fSniklas 298*2159047fSniklas typedef struct { 299*2159047fSniklas unsigned rfd : 12; /* index into the file indirect table */ 300*2159047fSniklas unsigned index : 20; /* index int sym/aux/iss tables */ 301*2159047fSniklas } RNDXR, *pRNDXR; 302*2159047fSniklas #define cbRNDXR sizeof(RNDXR) 303*2159047fSniklas #define rndxNil ((pRNDXR)0) 304*2159047fSniklas 305*2159047fSniklas /* dense numbers or sometimes called block numbers are stored in this type, 306*2159047fSniklas * a rfd of 0xffffffff is an index into the global table. 307*2159047fSniklas */ 308*2159047fSniklas typedef struct { 309*2159047fSniklas unsigned long rfd; /* index into the file table */ 310*2159047fSniklas unsigned long index; /* index int sym/aux/iss tables */ 311*2159047fSniklas } DNR, *pDNR; 312*2159047fSniklas #define cbDNR sizeof(DNR) 313*2159047fSniklas #define dnNil ((pDNR)0) 314*2159047fSniklas 315*2159047fSniklas 316*2159047fSniklas 317*2159047fSniklas /* 318*2159047fSniklas * Auxillary information occurs only if needed. 319*2159047fSniklas * It ALWAYS occurs in this order when present. 320*2159047fSniklas 321*2159047fSniklas isymMac used by stProc only 322*2159047fSniklas TIR type info 323*2159047fSniklas TIR additional TQ info (if first TIR was not enough) 324*2159047fSniklas rndx if (bt == btStruct,btUnion,btEnum,btSet,btRange, 325*2159047fSniklas btTypedef): 326*2159047fSniklas rsym.index == iaux for btSet or btRange 327*2159047fSniklas else rsym.index == isym 328*2159047fSniklas dimLow btRange, btSet 329*2159047fSniklas dimMac btRange, btSet 330*2159047fSniklas rndx0 As many as there are tq arrays 331*2159047fSniklas dimLow0 332*2159047fSniklas dimHigh0 333*2159047fSniklas ... 334*2159047fSniklas rndxMax-1 335*2159047fSniklas dimLowMax-1 336*2159047fSniklas dimHighMax-1 337*2159047fSniklas width in bits if (bit field), width in bits. 338*2159047fSniklas */ 339*2159047fSniklas #define cAuxMax (6 + (idimMax*3)) 340*2159047fSniklas 341*2159047fSniklas /* a union of all possible info in the AUX universe */ 342*2159047fSniklas typedef union { 343*2159047fSniklas TIR ti; /* type information record */ 344*2159047fSniklas RNDXR rndx; /* relative index into symbol table */ 345*2159047fSniklas long dnLow; /* low dimension */ 346*2159047fSniklas long dnHigh; /* high dimension */ 347*2159047fSniklas long isym; /* symbol table index (end of proc) */ 348*2159047fSniklas long iss; /* index into string space (not used) */ 349*2159047fSniklas long width; /* width for non-default sized struc fields */ 350*2159047fSniklas long count; /* count of ranges for variant arm */ 351*2159047fSniklas } AUXU, *pAUXU; 352*2159047fSniklas #define cbAUXU sizeof(AUXU) 353*2159047fSniklas #define auxNil ((pAUXU)0) 354*2159047fSniklas #define iauxNil -1 355*2159047fSniklas 356*2159047fSniklas 357*2159047fSniklas /* 358*2159047fSniklas * Optimization symbols 359*2159047fSniklas * 360*2159047fSniklas * Optimization symbols contain some overlap information with the normal 361*2159047fSniklas * symbol table. In particular, the proc information 362*2159047fSniklas * is somewhat redundant but necessary to easily find the other information 363*2159047fSniklas * present. 364*2159047fSniklas * 365*2159047fSniklas * All of the offsets are relative to the beginning of the last otProc 366*2159047fSniklas */ 367*2159047fSniklas 368*2159047fSniklas typedef struct { 369*2159047fSniklas unsigned ot: 8; /* optimization type */ 370*2159047fSniklas unsigned value: 24; /* address where we are moving it to */ 371*2159047fSniklas RNDXR rndx; /* points to a symbol or opt entry */ 372*2159047fSniklas unsigned long offset; /* relative offset this occured */ 373*2159047fSniklas } OPTR, *pOPTR; 374*2159047fSniklas #define optNil ((pOPTR) 0) 375*2159047fSniklas #define cbOPTR sizeof(OPTR) 376*2159047fSniklas #define ioptNil -1 377*2159047fSniklas 378*2159047fSniklas /* 379*2159047fSniklas * File Indirect 380*2159047fSniklas * 381*2159047fSniklas * When a symbol is referenced across files the following procedure is used: 382*2159047fSniklas * 1) use the file index to get the File indirect entry. 383*2159047fSniklas * 2) use the file indirect entry to get the File descriptor. 384*2159047fSniklas * 3) add the sym index to the base of that file's sym table 385*2159047fSniklas * 386*2159047fSniklas */ 387*2159047fSniklas 388*2159047fSniklas typedef long RFDT, *pRFDT; 389*2159047fSniklas #define cbRFDT sizeof(RFDT) 390*2159047fSniklas #define rfdNil -1 391*2159047fSniklas 392*2159047fSniklas /* 393*2159047fSniklas * The file indirect table in the mips loader is known as an array of FITs. 394*2159047fSniklas * This is done to keep the code in the loader readable in the area where 395*2159047fSniklas * these tables are merged. Note this is only a name change. 396*2159047fSniklas */ 397*2159047fSniklas typedef long FIT, *pFIT; 398*2159047fSniklas #define cbFIT sizeof(FIT) 399*2159047fSniklas #define ifiNil -1 400*2159047fSniklas #define fiNil ((pFIT) 0) 401*2159047fSniklas 402*2159047fSniklas #ifdef _LANGUAGE_PASCAL 403*2159047fSniklas #define ifdNil -1 404*2159047fSniklas #define ilnNil -1 405*2159047fSniklas #define ipdNil -1 406*2159047fSniklas #define ilineNil -1 407*2159047fSniklas #define isymNil -1 408*2159047fSniklas #define indexNil 16#fffff 409*2159047fSniklas #define issNil -1 410*2159047fSniklas #define issNull 0 411*2159047fSniklas #define itqMax 6 412*2159047fSniklas #define iauxNil -1 413*2159047fSniklas #define ioptNil -1 414*2159047fSniklas #define rfdNil -1 415*2159047fSniklas #define ifiNil -1 416*2159047fSniklas #endif /* _LANGUAGE_PASCAL */ 417*2159047fSniklas 418*2159047fSniklas 419*2159047fSniklas /* Dense numbers 420*2159047fSniklas * 421*2159047fSniklas * Rather than use file index, symbol index pairs to represent symbols 422*2159047fSniklas * and globals, we use dense number so that they can be easily embeded 423*2159047fSniklas * in intermediate code and the programs that process them can 424*2159047fSniklas * use direct access tabls instead of hash table (which would be 425*2159047fSniklas * necesary otherwise because of the sparse name space caused by 426*2159047fSniklas * file index, symbol index pairs. Dense number are represented 427*2159047fSniklas * by RNDXRs. 428*2159047fSniklas */ 429*2159047fSniklas 430*2159047fSniklas /* 431*2159047fSniklas * The following table defines the meaning of each SYM field as 432*2159047fSniklas * a function of the "st". (scD/B == scData OR scBss) 433*2159047fSniklas * 434*2159047fSniklas * Note: the value "isymMac" is used by symbols that have the concept 435*2159047fSniklas * of enclosing a block of related information. This value is the 436*2159047fSniklas * isym of the first symbol AFTER the end associated with the primary 437*2159047fSniklas * symbol. For example if a procedure was at isym==90 and had an 438*2159047fSniklas * isymMac==155, the associated end would be at isym==154, and the 439*2159047fSniklas * symbol at 155 would probably (although not necessarily) be the 440*2159047fSniklas * symbol for the next procedure. This allows rapid skipping over 441*2159047fSniklas * internal information of various sorts. "stEnd"s ALWAYS have the 442*2159047fSniklas * isym of the primary symbol that started the block. 443*2159047fSniklas * 444*2159047fSniklas 445*2159047fSniklas ST SC VALUE INDEX 446*2159047fSniklas -------- ------ -------- ------ 447*2159047fSniklas stFile scText address isymMac 448*2159047fSniklas stLabel scText address --- 449*2159047fSniklas stGlobal scD/B address iaux 450*2159047fSniklas stStatic scD/B address iaux 451*2159047fSniklas stParam scAbs offset iaux 452*2159047fSniklas stLocal scAbs offset iaux 453*2159047fSniklas stProc scText address iaux (isymMac is first AUX) 454*2159047fSniklas stStaticProc scText address iaux (isymMac is first AUX) 455*2159047fSniklas 456*2159047fSniklas stMember scNil ordinal --- (if member of enum) 457*2159047fSniklas (mipsread thinks the case below has a bit, not byte, offset.) 458*2159047fSniklas stMember scNil byte offset iaux (if member of struct/union) 459*2159047fSniklas stMember scBits bit offset iaux (bit field spec) 460*2159047fSniklas 461*2159047fSniklas stBlock scText address isymMac (text block) 462*2159047fSniklas (the code seems to think that rather than scNil, we see scInfo for 463*2159047fSniklas the two cases below.) 464*2159047fSniklas stBlock scNil cb isymMac (struct/union member define) 465*2159047fSniklas stBlock scNil cMembers isymMac (enum member define) 466*2159047fSniklas 467*2159047fSniklas (New types added by SGI to simplify things:) 468*2159047fSniklas stStruct scInfo cb isymMac (struct type define) 469*2159047fSniklas stUnion scInfo cb isymMac (union type define) 470*2159047fSniklas stEnum scInfo cMembers isymMac (enum type define) 471*2159047fSniklas 472*2159047fSniklas stEnd scText address isymStart 473*2159047fSniklas stEnd scNil ------- isymStart (struct/union/enum) 474*2159047fSniklas 475*2159047fSniklas stTypedef scNil ------- iaux 476*2159047fSniklas stRegReloc sc??? value old register number 477*2159047fSniklas stForward sc??? new address isym to original symbol 478*2159047fSniklas 479*2159047fSniklas stConstant scInfo value --- (scalar) 480*2159047fSniklas stConstant scInfo iss --- (complex, e.g. string) 481*2159047fSniklas 482*2159047fSniklas * 483*2159047fSniklas */ 484*2159047fSniklas #endif 485