Place .bss section in 0xf0000 segment.
Storing the .bss separately from .data is confusing - so unite them.
diff --git a/src/config.h b/src/config.h
index ba63b7e..fa7ae9e 100644
--- a/src/config.h
+++ b/src/config.h
@@ -81,7 +81,6 @@
#define BUILD_STACK_ADDR 0xfffe
#define BUILD_CPU_COUNT_ADDR 0xf000
#define BUILD_AP_BOOT_ADDR 0x10000
-#define BUILD_BSS_ADDR 0x40000
#define BUILD_BIOS_ADDR 0xf0000
#define BUILD_BIOS_SIZE 0x10000
/* 64 KB used to copy the BIOS to shadow RAM */
diff --git a/src/post.c b/src/post.c
index 7e8f523..1e9e818 100644
--- a/src/post.c
+++ b/src/post.c
@@ -303,8 +303,8 @@
dprintf(1, "Start bios\n");
// Setup for .bss and .data sections
- clear_bss();
make_bios_writable();
+ clear_bss();
// Perform main setup code.
post();
@@ -318,7 +318,6 @@
// Prep for boot process.
make_bios_readonly();
- clear_bss();
// Invoke int 19 to start boot process.
dprintf(3, "Jump to int19\n");
diff --git a/src/rombios.lds.S b/src/rombios.lds.S
index 16347f6..e3527ac 100644
--- a/src/rombios.lds.S
+++ b/src/rombios.lds.S
@@ -22,8 +22,4 @@
final_code16_fixed_start = . ;
*(.text16.fixed.addr)
}
-
- .bss __bss_start : {
- *(.bss)
- }
}
diff --git a/src/rombios32.lds.S b/src/rombios32.lds.S
index 6b66f03..3308345 100644
--- a/src/rombios32.lds.S
+++ b/src/rombios32.lds.S
@@ -19,14 +19,10 @@
code32_data = . ;
*(.data)
. = ALIGN(16) ;
+ __bss_start = . ;
+ *(.bss)
+ *(COMMON)
+ __bss_end = . ;
}
code32_end = . ;
-
- . = BUILD_BSS_ADDR ;
- __bss_start = . ;
- .bss : {
- *(.bss)
- *(COMMON)
- }
- __bss_end = . ;
}