[syslinux:pathbased] core: move aligned segments earlier

syslinux-bot for H. Peter Anvin hpa at zytor.com
Wed Feb 24 11:18:17 PST 2010


Commit-ID:  a2656772d030444ee1e2bdd289d3726edcf2d741
Gitweb:     http://syslinux.zytor.com/commit/a2656772d030444ee1e2bdd289d3726edcf2d741
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Wed, 24 Feb 2010 11:14:04 -0800
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Wed, 24 Feb 2010 11:14:04 -0800

core: move aligned segments earlier

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 at zytor.com>


---
 core/syslinux.ld |   35 ++++++++++++++++++-----------------
 1 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/core/syslinux.ld b/core/syslinux.ld
index 6c7cd97..fd5c5fe 100644
--- a/core/syslinux.ld
+++ b/core/syslinux.ld
@@ -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 = .;
 



More information about the Syslinux-commits mailing list