87bace02ddc88fa2edef2148b9c76733bbfa2731
[gem5.git] / base / loader / coff_symconst.h
1 /*
2 * Taken from binutils-2.14.90.0.5 include/coff/symconst.h
3 */
4
5 /* Declarations of constants for internal format of MIPS ECOFF symbols.
6 Originally contributed by MIPS Computer Systems and Third Eye Software.
7 Changes contributed by Cygnus Support are in the public domain.
8
9 This file is just aggregated with the files that make up the GNU
10 release; it is not considered part of GAS, GDB, or other GNU
11 programs. */
12
13 /*
14 * |-----------------------------------------------------------|
15 * | Copyright (c) 1992, 1991, 1990 MIPS Computer Systems, Inc.|
16 * | MIPS Computer Systems, Inc. grants reproduction and use |
17 * | rights to all parties, PROVIDED that this comment is |
18 * | maintained in the copy. |
19 * |-----------------------------------------------------------|
20 */
21
22 /* (C) Copyright 1984 by Third Eye Software, Inc.
23 *
24 * Third Eye Software, Inc. grants reproduction and use rights to
25 * all parties, PROVIDED that this comment is maintained in the copy.
26 *
27 * Third Eye makes no claims about the applicability of this
28 * symbol table to a particular use.
29 */
30
31 /* glevels for field in FDR */
32 #define GLEVEL_0 2
33 #define GLEVEL_1 1
34 #define GLEVEL_2 0 /* for upward compat reasons. */
35 #define GLEVEL_3 3
36
37 /* magic number fo symheader */
38 #define magicSym 0x7009
39 /* The Alpha uses this value instead, for some reason. */
40 #define magicSym2 0x1992
41
42 /* Language codes */
43 #define langC 0
44 #define langPascal 1
45 #define langFortran 2
46 #define langAssembler 3 /* one Assembley inst might map to many mach */
47 #define langMachine 4
48 #define langNil 5
49 #define langAda 6
50 #define langPl1 7
51 #define langCobol 8
52 #define langStdc 9 /* FIXME: Collides with SGI langCplusplus */
53 #define langCplusplus 9 /* FIXME: Collides with langStdc */
54 #define langCplusplusV2 10 /* SGI addition */
55 #define langMax 11 /* maximun allowed 32 -- 5 bits */
56
57 /* The following are value definitions for the fields in the SYMR */
58
59 /*
60 * Storage Classes
61 */
62
63 #define scNil 0
64 #define scText 1 /* text symbol */
65 #define scData 2 /* initialized data symbol */
66 #define scBss 3 /* un-initialized data symbol */
67 #define scRegister 4 /* value of symbol is register number */
68 #define scAbs 5 /* value of symbol is absolute */
69 #define scUndefined 6 /* who knows? */
70 #define scCdbLocal 7 /* variable's value is IN se->va.?? */
71 #define scBits 8 /* this is a bit field */
72 #define scCdbSystem 9 /* variable's value is IN CDB's address space */
73 #define scDbx 9 /* overlap dbx internal use */
74 #define scRegImage 10 /* register value saved on stack */
75 #define scInfo 11 /* symbol contains debugger information */
76 #define scUserStruct 12 /* address in struct user for current process */
77 #define scSData 13 /* load time only small data */
78 #define scSBss 14 /* load time only small common */
79 #define scRData 15 /* load time only read only data */
80 #define scVar 16 /* Var parameter (fortran,pascal) */
81 #define scCommon 17 /* common variable */
82 #define scSCommon 18 /* small common */
83 #define scVarRegister 19 /* Var parameter in a register */
84 #define scVariant 20 /* Variant record */
85 #define scSUndefined 21 /* small undefined(external) data */
86 #define scInit 22 /* .init section symbol */
87 #define scBasedVar 23 /* Fortran or PL/1 ptr based var */
88 #define scXData 24 /* exception handling data */
89 #define scPData 25 /* Procedure section */
90 #define scFini 26 /* .fini section */
91 #define scRConst 27 /* .rconst section */
92 #define scMax 32
93
94
95 /*
96 * Symbol Types
97 */
98
99 #define stNil 0 /* Nuthin' special */
100 #define stGlobal 1 /* external symbol */
101 #define stStatic 2 /* static */
102 #define stParam 3 /* procedure argument */
103 #define stLocal 4 /* local variable */
104 #define stLabel 5 /* label */
105 #define stProc 6 /* " " Procedure */
106 #define stBlock 7 /* beginnning of block */
107 #define stEnd 8 /* end (of anything) */
108 #define stMember 9 /* member (of anything - struct/union/enum */
109 #define stTypedef 10 /* type definition */
110 #define stFile 11 /* file name */
111 #define stRegReloc 12 /* register relocation */
112 #define stForward 13 /* forwarding address */
113 #define stStaticProc 14 /* load time only static procs */
114 #define stConstant 15 /* const */
115 #define stStaParam 16 /* Fortran static parameters */
116 /* These new symbol types have been recently added to SGI machines. */
117 #define stStruct 26 /* Beginning of block defining a struct type */
118 #define stUnion 27 /* Beginning of block defining a union type */
119 #define stEnum 28 /* Beginning of block defining an enum type */
120 #define stIndirect 34 /* Indirect type specification */
121 /* Pseudo-symbols - internal to debugger */
122 #define stStr 60 /* string */
123 #define stNumber 61 /* pure number (ie. 4 NOR 2+2) */
124 #define stExpr 62 /* 2+2 vs. 4 */
125 #define stType 63 /* post-coersion SER */
126 #define stMax 64
127
128 /* definitions for fields in TIR */
129
130 /* type qualifiers for ti.tq0 -> ti.(itqMax-1) */
131 #define tqNil 0 /* bt is what you see */
132 #define tqPtr 1 /* pointer */
133 #define tqProc 2 /* procedure */
134 #define tqArray 3 /* duh */
135 #define tqFar 4 /* longer addressing - 8086/8 land */
136 #define tqVol 5 /* volatile */
137 #define tqConst 6 /* const */
138 #define tqMax 8
139
140 /* basic types as seen in ti.bt */
141 #define btNil 0 /* undefined (also, enum members) */
142 #define btAdr 1 /* address - integer same size as pointer */
143 #define btChar 2 /* character */
144 #define btUChar 3 /* unsigned character */
145 #define btShort 4 /* short */
146 #define btUShort 5 /* unsigned short */
147 #define btInt 6 /* int */
148 #define btUInt 7 /* unsigned int */
149 #define btLong 8 /* long */
150 #define btULong 9 /* unsigned long */
151 #define btFloat 10 /* float (real) */
152 #define btDouble 11 /* Double (real) */
153 #define btStruct 12 /* Structure (Record) */
154 #define btUnion 13 /* Union (variant) */
155 #define btEnum 14 /* Enumerated */
156 #define btTypedef 15 /* defined via a typedef, isymRef points */
157 #define btRange 16 /* subrange of int */
158 #define btSet 17 /* pascal sets */
159 #define btComplex 18 /* fortran complex */
160 #define btDComplex 19 /* fortran double complex */
161 #define btIndirect 20 /* forward or unnamed typedef */
162 #define btFixedDec 21 /* Fixed Decimal */
163 #define btFloatDec 22 /* Float Decimal */
164 #define btString 23 /* Varying Length Character String */
165 #define btBit 24 /* Aligned Bit String */
166 #define btPicture 25 /* Picture */
167 #define btVoid 26 /* void */
168 #define btLongLong 27 /* long long */
169 #define btULongLong 28 /* unsigned long long */
170 #define btMax 64