Allow rom to grow beyond 64K.
[seabios.git] / src / rombios.lds.S
index 20f7bfb1387f383c2221c937b2b05ac42a1b7a3a..8400732e39bde82309e5206b1cb449ecd72eb377 100644 (file)
@@ -4,17 +4,22 @@
 //
 // This file may be distributed under the terms of the GNU LGPLv3 license.
 
-OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
+#include "config.h" // BUILD_BIOS_ADDR
+
+OUTPUT_FORMAT("elf32-i386")
 OUTPUT_ARCH("i386")
 ENTRY(post32)
 SECTIONS
 {
         .text code32_start : {
-                *(.text)
+                *(.text32)
 
-                . = code16_start ;
+                . = code16_start + BUILD_BIOS_ADDR - code32_start ;
                 *(.text16)
                 final_code16_end = . ;
                 }
-        /DISCARD/ : { *(.discard*) *(.eh_frame) }
+        /DISCARD/ : {
+                *(.text*) *(.data*) *(.bss*) *(.rodata*)
+                *(COMMON) *(.discard*) *(.eh_frame)
+                }
 }