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