Boot framework rework (#45)
[lunaix-os.git] / lunaix-os / arch / x86 / includes / linking / boot_secs.ldx
index 3c71be15aa8b5cc2c1c189005ed7cb5c9eb7cb0d..d918c849965dda4522ed4ee81cf90a6490f1673f 100644 (file)
@@ -3,27 +3,23 @@
 
 #include "base_defs.ld.inc"
 
 
 #include "base_defs.ld.inc"
 
-__kboot_start = .;
-
-.boot.text BLOCK(PAGE_GRAN) : 
+.boot.text BLOCK(PAGE_GRAN) :
 {
 #if defined(CONFIG_X86_BL_MB) || defined(CONFIG_X86_BL_MB2)
     *(.multiboot)
 #endif
 
     *(.boot.text)
 {
 #if defined(CONFIG_X86_BL_MB) || defined(CONFIG_X86_BL_MB2)
     *(.multiboot)
 #endif
 
     *(.boot.text)
-}
-
-.boot.bss BLOCK(PAGE_GRAN) : 
-{
-    *(.boot.bss)
-}
+} : boot_text 
 
 
-.boot.data BLOCK(PAGE_GRAN) : 
+.boot.data BLOCK(PAGE_GRAN) :
 {
 {
+    /*
+        We treat our boot.bss as data.
+        to avoid confusing linker and some bootloader
+    */
     *(.boot.data)
     *(.boot.data)
-}
-
-__kboot_end = ALIGN(PAGE_GRAN);
+    *(.boot.bss)
+} : boot_data
 
 #endif /* __LUNAIX_BOOT_SECS_LD_INC */
 
 #endif /* __LUNAIX_BOOT_SECS_LD_INC */