core: move aligned segments earlier
authorH. Peter Anvin <hpa@zytor.com>
Wed, 24 Feb 2010 19:14:04 +0000 (11:14 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 24 Feb 2010 19:14:04 +0000 (11:14 -0800)
Move the aligned segments downward, to provide for the largest
possible contiguous lowmem heap.  This minimizes the necessary lowmem
footprint.  (Note: the heap doesn't actually need to be contiguous,
but having it not be makes it harder to size.)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/syslinux.ld

index 6c7cd97..fd5c5fe 100644 (file)
@@ -196,8 +196,24 @@ SECTIONS
        __assert_end16 = ASSERT(_end16 <= 0x10000, "64K overflow");
 
        /*
-        * The auxilliary data segment is allowed to spill out of the
-        * low 64K.
+        * Special 16-bit segments
+        */
+
+       . = ALIGN(65536);
+       .real_mode (NOLOAD) : {
+               *(.real_mode)
+       }
+       real_mode_seg = core_real_mode >> 4;
+
+       . = ALIGN(65536);
+       .xfer_buf (NOLOAD) : {
+               *(.xfer_buf)
+       }
+       xfer_buf_seg = core_xfer_buf >> 4;
+
+       /*
+        * The auxilliary data segment is used by the 16-bit code
+        * for items that don't need to live in the bottom 64K.
         */
 
        . = ALIGN(16);
@@ -226,21 +242,6 @@ SECTIONS
        __high_clear_len = __high_clear_end - __high_clear_start;
        __high_clear_dwords = (__high_clear_len + 3) >> 2;
 
-       /*
-        * Special 16-bit segments
-        */
-       . = ALIGN(65536);
-       .real_mode (NOLOAD) : {
-               *(.real_mode)
-       }
-       real_mode_seg = core_real_mode >> 4;
-
-       . = ALIGN(65536);
-       .xfer_buf (NOLOAD) : {
-               *(.xfer_buf)
-       }
-       xfer_buf_seg = core_xfer_buf >> 4;
-
        /* Start of the lowmem heap */
        __lowmem_heap = .;