diff options
author | hpa <hpa> | 2005-08-22 22:07:32 +0000 |
---|---|---|
committer | hpa <hpa> | 2005-08-22 22:07:32 +0000 |
commit | 9edb4d65029c36318601762268b9e2c0e0d4cb79 (patch) | |
tree | 23fe2819fb3d56c144dcf9ac874df704512f78c4 | |
parent | 44414fa976b0c71ce22888f1c3020724494b9bce (diff) | |
download | syslinux-9edb4d65029c36318601762268b9e2c0e0d4cb79.tar.gz |
Make sure we have at least 4K for the stack.syslinux-3.10-pre20
-rw-r--r-- | isolinux.asm | 8 | ||||
-rw-r--r-- | layout.inc | 12 |
2 files changed, 15 insertions, 5 deletions
diff --git a/isolinux.asm b/isolinux.asm index d1697d66..f488dba0 100644 --- a/isolinux.asm +++ b/isolinux.asm @@ -218,9 +218,9 @@ xbs_vgatmpbuf equ 2*trackbufsize ;; CD-ROM sector (2K) of the file, so the number one priority is actually ;; loading the rest. ;; -bootsec equ $ +StackBuf equ $ -StackBuf equ $-44 +bootsec equ $ _start: ; Far jump makes sure we canonicalize the address cli @@ -759,7 +759,7 @@ xint13: mov byte [RetryCount],retry_count ; then do a hard reboot. ; kaboom: - lss sp,[cs:Stack] + lss sp,[cs:StackPtr] mov ax,cs mov ds,ax mov es,ax @@ -818,7 +818,7 @@ crlf_msg db CR, LF null_msg db 0 alignb 4, db 0 -Stack dw _start, 0 ; SS:SP for stack reset +StackPtr dw StackBuf, 0 ; SS:SP for stack reset MaxTransfer dw 32 ; Max sectors per transfer rl_checkpt equ $ ; Must be <= 800h @@ -25,9 +25,15 @@ BSS_START equ 0800h TEXT_START equ 7C00h ; The secondary BSS section, above the text; we really wish we could -; just make it follow .bcopy32, but it doesn't seem to work that way. +; just make it follow .bcopy32 or hang off the end, +; but it doesn't seem to work that way. LATEBSS_START equ 0B000h +; Reserve memory for the stack. This causes checkov to abort the +; compile if we violate this space. +STACK_SIZE equ 4096 +STACK_START equ TEXT_START-STACK_SIZE + %ifdef MAP [map all MAP] %endif @@ -52,3 +58,7 @@ LATEBSS_START equ 0B000h ; NASM BUG: We would like to do follows=.bcopy32 section .latebss nobits align=16 start=LATEBSS_START + ; Reserve space for stack + section .stack nobits align=16 start=STACK_START +Stack resb STACK_SIZE + |