xref: /openbsd-src/gnu/usr.bin/binutils/include/coff/symconst.h (revision c88b1d6c2990dec69cf89c9efe884ddff6a0bbe5)
12159047fSniklas /* Declarations of constants for internal format of MIPS ECOFF symbols.
22159047fSniklas    Originally contributed by MIPS Computer Systems and Third Eye Software.
32159047fSniklas    Changes contributed by Cygnus Support are in the public domain.
42159047fSniklas 
52159047fSniklas    This file is just aggregated with the files that make up the GNU
62159047fSniklas    release; it is not considered part of GAS, GDB, or other GNU
72159047fSniklas    programs.  */
82159047fSniklas 
92159047fSniklas /*
102159047fSniklas  * |-----------------------------------------------------------|
112159047fSniklas  * | Copyright (c) 1992, 1991, 1990 MIPS Computer Systems, Inc.|
122159047fSniklas  * | MIPS Computer Systems, Inc. grants reproduction and use   |
132159047fSniklas  * | rights to all parties, PROVIDED that this comment is      |
142159047fSniklas  * | maintained in the copy.                                   |
152159047fSniklas  * |-----------------------------------------------------------|
162159047fSniklas  */
172159047fSniklas 
182159047fSniklas /* (C) Copyright 1984 by Third Eye Software, Inc.
192159047fSniklas  *
202159047fSniklas  * Third Eye Software, Inc. grants reproduction and use rights to
212159047fSniklas  * all parties, PROVIDED that this comment is maintained in the copy.
222159047fSniklas  *
232159047fSniklas  * Third Eye makes no claims about the applicability of this
242159047fSniklas  * symbol table to a particular use.
252159047fSniklas  */
262159047fSniklas 
272159047fSniklas /* glevels for field in FDR */
282159047fSniklas #define GLEVEL_0	2
292159047fSniklas #define GLEVEL_1	1
302159047fSniklas #define GLEVEL_2	0	/* for upward compat reasons. */
312159047fSniklas #define GLEVEL_3	3
322159047fSniklas 
332159047fSniklas /* magic number fo symheader */
342159047fSniklas #define magicSym	0x7009
352159047fSniklas /* The Alpha uses this value instead, for some reason.  */
362159047fSniklas #define magicSym2	0x1992
372159047fSniklas 
382159047fSniklas /* Language codes */
392159047fSniklas #define langC		0
402159047fSniklas #define langPascal	1
412159047fSniklas #define langFortran	2
422159047fSniklas #define	langAssembler	3	/* one Assembley inst might map to many mach */
432159047fSniklas #define langMachine	4
442159047fSniklas #define langNil		5
452159047fSniklas #define langAda		6
462159047fSniklas #define langPl1		7
472159047fSniklas #define langCobol	8
482159047fSniklas #define langStdc	9	/* FIXME: Collides with SGI langCplusplus */
492159047fSniklas #define langCplusplus	9	/* FIXME: Collides with langStdc */
502159047fSniklas #define langCplusplusV2	10	/* SGI addition */
512159047fSniklas #define langMax		11	/* maximun allowed 32 -- 5 bits */
522159047fSniklas 
532159047fSniklas /* The following are value definitions for the fields in the SYMR */
542159047fSniklas 
552159047fSniklas /*
562159047fSniklas  * Storage Classes
572159047fSniklas  */
582159047fSniklas 
592159047fSniklas #define scNil		0
602159047fSniklas #define scText		1	/* text symbol */
612159047fSniklas #define scData		2	/* initialized data symbol */
622159047fSniklas #define scBss		3	/* un-initialized data symbol */
632159047fSniklas #define scRegister	4	/* value of symbol is register number */
642159047fSniklas #define scAbs		5	/* value of symbol is absolute */
652159047fSniklas #define scUndefined	6	/* who knows? */
662159047fSniklas #define scCdbLocal	7	/* variable's value is IN se->va.?? */
672159047fSniklas #define scBits		8	/* this is a bit field */
682159047fSniklas #define scCdbSystem	9	/* variable's value is IN CDB's address space */
692159047fSniklas #define scDbx		9	/* overlap dbx internal use */
702159047fSniklas #define scRegImage	10	/* register value saved on stack */
712159047fSniklas #define scInfo		11	/* symbol contains debugger information */
722159047fSniklas #define scUserStruct	12	/* address in struct user for current process */
732159047fSniklas #define scSData		13	/* load time only small data */
742159047fSniklas #define scSBss		14	/* load time only small common */
752159047fSniklas #define scRData		15	/* load time only read only data */
762159047fSniklas #define scVar		16	/* Var parameter (fortran,pascal) */
772159047fSniklas #define scCommon	17	/* common variable */
782159047fSniklas #define scSCommon	18	/* small common */
792159047fSniklas #define scVarRegister	19	/* Var parameter in a register */
802159047fSniklas #define scVariant	20	/* Variant record */
812159047fSniklas #define scSUndefined	21	/* small undefined(external) data */
822159047fSniklas #define scInit		22	/* .init section symbol */
832159047fSniklas #define scBasedVar	23	/* Fortran or PL/1 ptr based var */
842159047fSniklas #define scXData         24      /* exception handling data */
852159047fSniklas #define scPData         25      /* Procedure section */
862159047fSniklas #define scFini          26      /* .fini section */
87*c88b1d6cSniklas #define scRConst	27	/* .rconst section */
882159047fSniklas #define scMax		32
892159047fSniklas 
902159047fSniklas 
912159047fSniklas /*
922159047fSniklas  *   Symbol Types
932159047fSniklas  */
942159047fSniklas 
952159047fSniklas #define stNil		0	/* Nuthin' special */
962159047fSniklas #define stGlobal	1	/* external symbol */
972159047fSniklas #define stStatic	2	/* static */
982159047fSniklas #define stParam		3	/* procedure argument */
992159047fSniklas #define stLocal		4	/* local variable */
1002159047fSniklas #define stLabel		5	/* label */
1012159047fSniklas #define stProc		6	/*     "      "	 Procedure */
1022159047fSniklas #define stBlock		7	/* beginnning of block */
1032159047fSniklas #define stEnd		8	/* end (of anything) */
1042159047fSniklas #define stMember	9	/* member (of anything	- struct/union/enum */
1052159047fSniklas #define stTypedef	10	/* type definition */
1062159047fSniklas #define stFile		11	/* file name */
1072159047fSniklas #define stRegReloc	12	/* register relocation */
1082159047fSniklas #define stForward	13	/* forwarding address */
1092159047fSniklas #define stStaticProc	14	/* load time only static procs */
1102159047fSniklas #define stConstant	15	/* const */
1112159047fSniklas #define stStaParam	16	/* Fortran static parameters */
1122159047fSniklas     /* These new symbol types have been recently added to SGI machines. */
1132159047fSniklas #define stStruct	26	/* Beginning of block defining a struct type */
1142159047fSniklas #define stUnion		27	/* Beginning of block defining a union type */
1152159047fSniklas #define stEnum		28	/* Beginning of block defining an enum type */
1162159047fSniklas #define stIndirect	34	/* Indirect type specification */
1172159047fSniklas     /* Pseudo-symbols - internal to debugger */
1182159047fSniklas #define stStr		60	/* string */
1192159047fSniklas #define stNumber	61	/* pure number (ie. 4 NOR 2+2) */
1202159047fSniklas #define stExpr		62	/* 2+2 vs. 4 */
1212159047fSniklas #define stType		63	/* post-coersion SER */
1222159047fSniklas #define stMax		64
1232159047fSniklas 
1242159047fSniklas /* definitions for fields in TIR */
1252159047fSniklas 
1262159047fSniklas /* type qualifiers for ti.tq0 -> ti.(itqMax-1) */
1272159047fSniklas #define tqNil	0	/* bt is what you see */
1282159047fSniklas #define tqPtr	1	/* pointer */
1292159047fSniklas #define tqProc	2	/* procedure */
1302159047fSniklas #define tqArray 3	/* duh */
1312159047fSniklas #define tqFar	4	/* longer addressing - 8086/8 land */
1322159047fSniklas #define tqVol	5	/* volatile */
1332159047fSniklas #define tqConst 6	/* const */
1342159047fSniklas #define tqMax	8
1352159047fSniklas 
1362159047fSniklas /* basic types as seen in ti.bt */
1372159047fSniklas #define btNil		0	/* undefined (also, enum members) */
1382159047fSniklas #define btAdr		1	/* address - integer same size as pointer */
1392159047fSniklas #define btChar		2	/* character */
1402159047fSniklas #define btUChar		3	/* unsigned character */
1412159047fSniklas #define btShort		4	/* short */
1422159047fSniklas #define btUShort	5	/* unsigned short */
1432159047fSniklas #define btInt		6	/* int */
1442159047fSniklas #define btUInt		7	/* unsigned int */
1452159047fSniklas #define btLong		8	/* long */
1462159047fSniklas #define btULong		9	/* unsigned long */
1472159047fSniklas #define btFloat		10	/* float (real) */
1482159047fSniklas #define btDouble	11	/* Double (real) */
1492159047fSniklas #define btStruct	12	/* Structure (Record) */
1502159047fSniklas #define btUnion		13	/* Union (variant) */
1512159047fSniklas #define btEnum		14	/* Enumerated */
1522159047fSniklas #define btTypedef	15	/* defined via a typedef, isymRef points */
1532159047fSniklas #define btRange		16	/* subrange of int */
1542159047fSniklas #define btSet		17	/* pascal sets */
1552159047fSniklas #define btComplex	18	/* fortran complex */
1562159047fSniklas #define btDComplex	19	/* fortran double complex */
1572159047fSniklas #define btIndirect	20	/* forward or unnamed typedef */
1582159047fSniklas #define btFixedDec	21	/* Fixed Decimal */
1592159047fSniklas #define btFloatDec	22	/* Float Decimal */
1602159047fSniklas #define btString	23	/* Varying Length Character String */
1612159047fSniklas #define btBit		24	/* Aligned Bit String */
1622159047fSniklas #define btPicture	25	/* Picture */
1632159047fSniklas #define btVoid		26	/* void */
1642159047fSniklas #define btLongLong	27	/* long long */
1652159047fSniklas #define btULongLong	28	/* unsigned long long */
1662159047fSniklas #define btMax		64
1672159047fSniklas 
1682159047fSniklas #if (_MFG == _MIPS)
1692159047fSniklas /* optimization type codes */
1702159047fSniklas #define otNil		0
1712159047fSniklas #define otReg		1	/* move var to reg */
1722159047fSniklas #define otBlock		2	/* begin basic block */
1732159047fSniklas #define	otProc		3	/* procedure */
1742159047fSniklas #define otInline	4	/* inline procedure */
1752159047fSniklas #define otEnd		5	/* whatever you started */
1762159047fSniklas #define otMax		6	/* KEEP UP TO DATE */
1772159047fSniklas #endif /* (_MFG == _MIPS) */
178