Subversion Repositories tendra.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
2
    		 Crown Copyright (c) 1997
3
 
4
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
12
 
13
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
15
 
16
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
19
 
20
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
22
        these conditions;
23
 
24
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
27
        it may be put.
28
*/
29
 
30
 
31
/**********************************************************************
32
$Author: release $
33
$Date: 1998/02/04 10:43:45 $
34
$Revision: 1.2 $
35
$Log: symtab.h,v $
36
 * Revision 1.2  1998/02/04  10:43:45  release
37
 * Changes during testing.
38
 *
39
 * Revision 1.1.1.1  1998/01/17  15:56:07  release
40
 * First version to be checked into rolling release.
41
 *
42
 * Revision 1.1  1995/04/13  09:08:06  currie
43
 * Initial revision
44
 *
45
***********************************************************************/
46
/*  S Y M B O L   T A B L E   P R O D U C T I O N   
47
 
48
by R. R. Rowlingson
49
 
50
Type definitions for the MIPS TDF translator to produce a .T , file (symbol table) suitable for as1.
51
 
52
*/
53
 
54
#include "cross_config.h"
55
#ifndef CROSS_INCLUDE
56
#include <sym.h>
57
#else
58
#include CROSS_INCLUDE/sym.h>
59
#endif
60
 
61
/********************************************************************
62
The following types store the symbolic information for each table
63
in the .T file. They consist of a count of the number of elements
64
(num,noofsyms) or size (usage) in the case of strings. This is followed
65
by a pointer to a fixed number of elements of the appropriate type . The
66
size of this space is given by the appropriate macro at the end of this file.
67
Consequently, when the number of elements in the table exceeds this fixed size
68
a new array is set up and pointed to by the nextsyms or overspill field.
69
This mechanism is transparent to the caller of the symbol table routines
70
given in new_symbol.c
71
********************************************************************/
72
 
73
/* array of local symbols and number of entries */
74
typedef struct lsymsd	{long noofsyms;
75
			pSYMR symlist;
76
			struct lsymsd *nextsyms;
77
			} LSYMS;
78
 
79
/* array of external symbols, pEXTR is a pointer to a SYMR and some additional context information */
80
typedef struct	esymsd	{long noofsyms;
81
			pEXTR symlist;
82
			struct esymsd *nextsyms;
83
			} ESYMS;
84
 
85
/* array of strings, need one for externals and one for each file's locals */
86
typedef struct strings	{long usage;	/* including end of string chars */
87
			char* str;
88
			struct strings *overspill;
89
			} STRINGS;
90
 
91
/* auxillary information, each AUXU differs according to the type of the symbol */
92
typedef struct auxtabd	{long num;
93
			pAUXU auxinfo;
94
			struct auxtabd *moreaux;
95
			} AUXTAB;
96
 
97
/* dense numbers */
98
typedef struct dtab	{long num;
99
			pDNR densenolist;
100
			struct dtab *moredensenos;
101
			} DENSETAB;
102
 
103
/* file descriptors */
104
typedef struct	{long num;
105
		pFDR filelist;
106
		} FILETAB;
107
 
108
/* File description info, 1 for each file. Will be converted to FDR for the symbol table by adding indices etc */
109
 
110
typedef struct symfdrd	{STRINGS* filestr;
111
			LSYMS* symbols;
112
			AUXTAB* auxtabs;
113
			short proc_count;
114
			} SYMFDR, *pSYMFDR;
115
 
116
 
117
/* type for recording isyms and filenums for each proc */
118
typedef struct {long fnum;
119
		long procsymindex;
120
		} PROCSYM;
121
 
122
/* this macro is only used by the symbol table printer and is not a genuine
123
part of the installer */
124
#define IFAUXINFO(X) (((X>=1)&&(X<5))||(X==6)||(X==9)||(X==10)||(X==14))
125
 
126
/* The following are the units of space allocated for the various tables */
127
 
128
#define STRINGTABSIZE 500	/* for each file */
129
#define SYMTABSIZE 200		/*  "         "  */
130
#define AUXTABSIZE  200		/*  "          " */
131
#define DENSETABSIZE 200	/* one for all files */