[syslinux:pathbased] core: use assembly for the .stack section
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Sat Mar 6 21:33:07 PST 2010
Commit-ID: e81b84b3b74ea3b3c1ebd1871e24868e54411d2b
Gitweb: http://syslinux.zytor.com/commit/e81b84b3b74ea3b3c1ebd1871e24868e54411d2b
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Sat, 6 Mar 2010 21:29:47 -0800
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Sat, 6 Mar 2010 21:29:47 -0800
core: use assembly for the .stack section
Use assembly to define the .stack section, so that it get proper
attributes.
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
core/layout.inc | 13 +++++++++++--
core/syslinux.ld | 4 +---
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/core/layout.inc b/core/layout.inc
index e453b26..dab27dd 100644
--- a/core/layout.inc
+++ b/core/layout.inc
@@ -27,7 +27,7 @@ BSS_START equ 0800h
TEXT_START equ 7C00h
;
-; Stack layout
+; 16-bit stack layout
;
; PXELINUX: There are apparently some AMI BIOSes in the field which
; put their BEV stack somewhere below 7C00h (and therefore don't
@@ -50,10 +50,19 @@ STACK_BASE equ STACK_TOP - STACK_LEN
LATEBSS_START equ 0B800h
;
+; 32-bit stack layout
+;
+ global STACK32_LEN
+STACK32_LEN equ 64*1024
+
+ section .stack nobits write align=4096
+ resb STACK32_LEN
+
+;
; The various sections and their relationship
;
; Use .earlybss for things that MUST be in low memory.
- section .earlybss nobits
+ section .earlybss nobits write
section .config write progbits align=4
section .replacestub exec write progbits align=16
section .gentextnr exec write nobits align=16
diff --git a/core/syslinux.ld b/core/syslinux.ld
index 07bd8d4..90f26f1 100644
--- a/core/syslinux.ld
+++ b/core/syslinux.ld
@@ -346,14 +346,12 @@ SECTIONS
__bss_len = __bss_end - __bss_start;
__bss_dwords = (__bss_len + 3) >> 2;
- . = ALIGN(65536);
-
/* XXX: This stack should be unified with the COM32 stack */
__stack_vma = .;
__stack_lma = .; /* Dummy */
.stack (NOLOAD) : AT(__stack_lma) {
__stack_start = .;
- . += STACK32_LEN;
+ *(.stack)
__stack_end = .;
}
__stack_len = __stack_end - __stack_start;
More information about the Syslinux-commits
mailing list