1 /* $Id: init_glob.c,v 1.6 1994/06/24 10:30:12 ceriel Exp $ */
3 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4 * See the copyright notice in the ACK home directory, in the file "Copyright".
9 * I N I T _ G L O B L S
20 extern short nrglobals;
24 /* Assign a 'global variable number (o_globnr) to
25 * every global variable for which we want to
26 * maintain ud-info. We do not maintain ud-info
27 * for a global variable if:
28 * - it is part of a ROM data block (so it will never be changed)
29 * - it's size is not known
30 * - it overlaps another variable (e.g. LOE X+2 ; LDE X)
38 for (d = fdblock; d != (dblock_p) 0; d = d->d_next) {
39 ill_zone = (offset) 0;
40 for (obj = d->d_objlist; obj != (obj_p) 0; obj = obj->o_next) {
41 if (d->d_pseudo == DROM ||
42 obj->o_size == UNKNOWN_SIZE) {
43 obj->o_globnr = 0; /* var. not considered */
46 if (obj->o_off < ill_zone) {
47 obj->o_globnr = 0; /* var. not considered */
48 if (prev != (obj_p) 0 && prev->o_globnr != 0) {
55 if ((x = obj->o_off + obj->o_size) > ill_zone) {