From: ceriel Date: Tue, 6 Dec 1988 13:22:34 +0000 (+0000) Subject: handle local commons in one place only X-Git-Tag: release-5-5~2703 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=87d03498148ae3d4a15696217aac040e17ea91d4;p=ack.git handle local commons in one place only --- diff --git a/util/ceg/ce_back/obj_back/end_back.c b/util/ceg/ce_back/obj_back/end_back.c index 3c5519246..30b9e692a 100644 --- a/util/ceg/ce_back/obj_back/end_back.c +++ b/util/ceg/ce_back/obj_back/end_back.c @@ -9,6 +9,20 @@ finish_tables() /* Prepare tables for do_local_relocation() and output(). */ { + register struct outname *np = symbol_table; + register int i = nname; + + for (; i; i--, np++) { + if ((np->on_type & S_COM) && ! (np->on_type & S_EXT)) { + long sz = np->on_valu; + + switchseg(SEGBSS); + align_word(); + np->on_type &= (~S_COM); + np->on_valu = cur_value(); + bss(sz); + } + } while ( ( text - text_area) % EM_WSIZE != 0 ) text1( '\0'); while ( ( data - data_area) % EM_WSIZE != 0 ) diff --git a/util/ceg/ce_back/obj_back/output.c b/util/ceg/ce_back/obj_back/output.c index 28a6b87b6..57a581000 100644 --- a/util/ceg/ce_back/obj_back/output.c +++ b/util/ceg/ce_back/obj_back/output.c @@ -129,15 +129,6 @@ reduce_name_table() register struct outname *np = &symbol_table[i]; np->on_type &= ~S_NEEDED; - if ((np->on_type & S_COM) && ! (np->on_type & S_EXT)) { - long sz = np->on_valu; - - switchseg(SEGBSS); - align_word(); - np->on_type &= (~S_COM); - np->on_valu = cur_value(); - bss(sz); - } if (diff_index[i] && diff_index[i] == diff_index[i-1]) { symbol_table[i - diff_index[i]] = *np; } diff --git a/util/ceg/ce_back/obj_back/relocation.c b/util/ceg/ce_back/obj_back/relocation.c index 0f0c49bc5..764efdd1b 100644 --- a/util/ceg/ce_back/obj_back/relocation.c +++ b/util/ceg/ce_back/obj_back/relocation.c @@ -24,15 +24,6 @@ do_local_relocation() register struct outname *np = &symbol_table[rp->or_nami]; int olddiff = diff; - if ((np->on_type & S_COM) && ! (np->on_type & S_EXT)) { - long sz = np->on_valu; - - switchseg(SEGBSS); - align_word(); - np->on_type &= (~S_COM); - np->on_valu = cur_value(); - bss(sz); - } if ( np->on_valu != -1 && ! (np->on_type & S_COM)) { register long oldval,newval; register char *sect;