2 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
9 static char rcs_id[] = "$Id: assda.c,v 2.8 1994/06/24 10:15:33 ceriel Exp $" ;
10 static char rcs_ass[]= RCS_ASS ;
11 static char rcs_ex[] = RCS_EX ;
27 The structure containing used for procedure environment stacking
32 * pointers to not yet allocated storage
34 glob_t *mglobs; /* pointer to module symbols */
35 glob_t *xglobs; /* pointer to extern symbols */
36 proc_t *mprocs; /* pointer to local procs */
37 proc_t *xprocs; /* pointer to external procs */
38 ptab_t *proctab; /* pointer to proctab[] */
41 * some array and structures of known size
43 FILE *ifile; /* input file buffer */
44 FILE *tfile; /* code file buffer */
45 FILE *dfile; /* data file buffer */
46 FILE *rtfile; /* code file buffer */
47 FILE *rdfile; /* data file buffer */
48 char string[MAXSTRING];
53 glob_t *lastglosym; /* last global symbol */
54 glob_t *curglosym; /* current global symbol */
55 relc_t *f_data = (relc_t *)0 ; /* first data reloc pointer */
56 relc_t *l_data = (relc_t *)0 ; /* last data reloc pointer */
57 relc_t *f_text = (relc_t *)0 ; /* first text reloc pointer */
58 relc_t *l_text = (relc_t *)0 ; /* last text reloc pointer */
63 int strlngth; /* index in string[] */
64 FOFFSET inpoff; /* offset in current input file */
65 FOFFSET libeof; /* ceiling for above number */
70 int procnum; /* generic for unique proc-descr. */
71 cons_t prog_size; /* length of current proc */
74 int line_num; /* line number for error messages */
75 int nerrors; /* number of nonfatal errors */
76 cons_t consiz; /* size of U,I or F value */
77 cons_t textbytes; /* size of code file */
78 cons_t databytes; /* highwater mark in data */
79 FOFFSET dataoff; /* size of data file */
80 FOFFSET textoff; /* size of text file */
81 FOFFSET lastoff; /* previous size before last block */
82 int datamode; /* what kind of data */
83 int datablocks; /* number of datablocks written out */
84 relc_t *lastheader; /* pointer into datareloc */
87 int unresolved; /* # of unresolved references */
88 int sourcelines; /* number of lines in source program*/
89 int intflags = 1; /* flags for interpreter */
93 int archmode; /* reading library ? */
94 int procflag; /* print "namelist" of procedures */
96 int c_flag; /* print unused opcodes */
97 char opcnt1[256]; /* count primary opcodes */
98 char opcnt2[256]; /* count secondary opcodes */
99 char opcnt3[256]; /* count long opcodes */
101 int d_flag = 0; /* don't dump */
102 int r_flag = 0; /* don't dump relocation tables */
106 int wflag = 0; /* don't issue warning messages */
107 int Uflag = 0; /* exit status 0 on unresolved refs */
109 int mod_sizes; /* Size info in current module ok? */
111 #define BASE (sizeof (struct lines) - sizeof (addr_u))
113 char linesize[VALLOW+1] = {
115 BASE + sizeof (cons_t), /* CONST */
116 BASE + sizeof prp_cast, /* PROCNAME */
117 BASE + sizeof gbp_cast, /* GLOSYM */
118 BASE + sizeof lbp_cast, /* LOCSYM */
119 BASE + sizeof (struct sad_df), /* GLOOFF */
120 BASE + sizeof (struct sad_ln), /* LINES */
127 char *progname; /* argv[0] */
128 char *curfile = 0; /* name of current file */
129 char *eout = "e.out";
131 siz_t sizes[NDEFAULT] = {
132 /* mlab, glab,mproc,xproc, proc */
133 { 151, 29, 31, 73, 130 }, /* small */
134 { 307, 127, 151, 401, 460 }, /* medium */
135 { 601, 251, 151, 401, 600 }, /* large */
136 {1601, 1601, 1601, 1601, 2000 } /* extra large */
138 siz_t *oursize = &sizes[2] ; /* point to selected sizes */