Avoid -fwhole-program on broken gcc instead of stopping build.
[seabios.git] / src / post.c
index a642e182a53d03290a794d45b11c6a53ed0d2a57..3c68990bedc1b3281cc298337b7ec5cb617f7997 100644 (file)
@@ -76,9 +76,9 @@ init_bda()
     struct bios_data_area_s *bda = MAKE_FLATPTR(SEG_BDA, 0);
     memset(bda, 0, sizeof(*bda));
 
-    int esize = DIV_ROUND_UP(sizeof(struct extended_bios_data_area_s), 1024);
+    int esize = EBDA_SIZE_START;
     SET_BDA(mem_size_kb, 640 - esize);
-    u16 eseg = FLATPTR_TO_SEG((640 - esize) * 1024);
+    u16 eseg = EBDA_SEGMENT_START;
     SET_BDA(ebda_seg, eseg);
 
     struct extended_bios_data_area_s *ebda = get_ebda_ptr();
@@ -220,8 +220,3 @@ _start()
     memset(&br, 0, sizeof(br));
     call16_int(0x19, &br);
 }
-
-// Ughh - some older gcc compilers have a bug which causes VISIBLE32
-// functions to not be exported as a global variable - force _start
-// to be global here.
-asm(".global _start");