Pristine Ack-5.5
[Ack-5.5.git] / mach / sun3 / ce / end_back.c
1 #include <out.h>
2 #include "mach.h"
3 #include "back.h"
4 #include "header.h"
5
6 static finish_tables();
7
8 end_back()
9 {
10         finish_tables();                 
11         do_local_relocation();
12         output_back();
13 }
14
15
16 static
17 finish_tables()
18 {
19         register struct outname *np = symbol_table;
20         register int i = nname;
21
22         for (; i; i--, np++) {
23                 if ((np->on_type & S_COM) && ! (np->on_type & S_EXT)) {
24                         long sz = np->on_valu;
25
26                         switchseg(SEGBSS);
27                         align_word();
28                         np->on_type &= (~S_COM);
29                         np->on_valu = cur_value();
30                         bss(sz);
31                 }
32         }
33         while ( ( text - text_area) % EM_WSIZE != 0 ) 
34                 text1( '\0');
35         while ( ( data - data_area) % EM_WSIZE != 0 )
36                 con1( '\0');
37 }