1988-09-15 09:49:22 +00:00
|
|
|
#include <out.h>
|
|
|
|
#include "mach.h"
|
|
|
|
#include "back.h"
|
|
|
|
#include "header.h"
|
|
|
|
|
1989-01-17 10:27:55 +00:00
|
|
|
static finish_tables();
|
1988-09-15 09:49:22 +00:00
|
|
|
|
|
|
|
end_back()
|
|
|
|
{
|
1989-01-17 10:27:55 +00:00
|
|
|
finish_tables();
|
1988-09-15 09:49:22 +00:00
|
|
|
do_local_relocation();
|
1989-01-17 10:27:55 +00:00
|
|
|
output_back();
|
1988-09-15 09:49:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1988-10-20 14:21:37 +00:00
|
|
|
static
|
1989-01-17 10:27:55 +00:00
|
|
|
finish_tables()
|
1988-09-15 09:49:22 +00:00
|
|
|
{
|
1989-01-17 10:27:55 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
1988-09-15 09:49:22 +00:00
|
|
|
while ( ( text - text_area) % EM_WSIZE != 0 )
|
|
|
|
text1( '\0');
|
|
|
|
while ( ( data - data_area) % EM_WSIZE != 0 )
|
|
|
|
con1( '\0');
|
|
|
|
}
|