Add helper macros for defining GDT descriptors.
[seabios.git] / src / rombios32.lds.S
index 66985fd2bf94fc8af0e67db6c38160b8d1581dfd..62e92d18faf6878e034f1a53a69b8fdc79308e92 100644 (file)
@@ -1,38 +1,22 @@
-// Linker definitions for 16 and 32 bit code
+// Linker definitions for 32 bit code
 //
 // Copyright (C) 2008  Kevin O'Connor <kevin@koconnor.net>
 //
-// This file may be distributed under the terms of the GNU GPLv3 license.
+// This file may be distributed under the terms of the GNU LGPLv3 license.
 
-#include "config.h"
+#include "config.h" // BUILD_BIOS_ADDR
 
 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
 OUTPUT_ARCH("i386")
-ENTRY(post32);
 SECTIONS
 {
-        .text BUILD_BIOS_ADDR : {
-                code32_start = . ;
-                *(.text)
-                *(.rodata*)
-                *(.data)
-                code32_end = . ;
+        .text32 BUILD_BIOS_ADDR : {
+                code32_start = ABSOLUTE(.) ;
 
-                . = ALIGN(16) ;
-                code16_start = . ;
-                *(.text16)
-                code16_end = . ;
-                freespace1_start = . ;
+// The actual sections kept is determined by the script tools/layoutrom.py
+#include "../out/romlayout32.lds"
 
-                . = BUILD_START_FIXED ;
-                freespace1_end = . ;
-                *(.text16.fixed.addr)
+                freespace_start = . ;
+                code32_end = ABSOLUTE(.) ;
                 }
-
-        .bss BUILD_BSS_ADDR : {
-                 __bss_start = . ;
-                 *(.bss)
-                 *(COMMON)
-                 __bss_end = . ;
-                 }
 }