From a2656772d030444ee1e2bdd289d3726edcf2d741 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 24 Feb 2010 11:14:04 -0800 Subject: [PATCH] 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 --- core/syslinux.ld | 35 ++++++++++++++++++----------------- 1 file 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 = .; -- 2.7.4