end_back.c 822 B

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