summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-06-26 20:38:04 -0700
committerH. Peter Anvin <hpa@zytor.com>2010-06-26 20:38:04 -0700
commit2d3c94d753dc27040c4ea93550429e231a205181 (patch)
tree2605b873658abb5e826facbd4feed833797d79cf
parent9057b5337c44c08343d403da2a31636dfc1ad741 (diff)
downloadsyslinux-2d3c94d753dc27040c4ea93550429e231a205181.tar.gz
core: move PartInfo back to the top of stack
Move PartInfo back to near the top of the stack. This makes it less likely that it ends up getting overwritten during the act of copying itself. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--core/diskstart.inc17
1 files changed, 8 insertions, 9 deletions
diff --git a/core/diskstart.inc b/core/diskstart.inc
index 7bb47dc6..bd819a9c 100644
--- a/core/diskstart.inc
+++ b/core/diskstart.inc
@@ -17,21 +17,20 @@
; Common early-bootstrap code for harddisk-based Syslinux derivatives.
;
- section .earlybss
- alignb 16
-PartInfo: ; Partition table info
-.mbr: resb 16 ; MBR partition info
-.gptlen: resd 1
-.gpt: resb 56 ; GPT partition info (minus name)
-FloppyTable resb 16 ; Floppy info table (must follow PartInfo)
-
section .init
;
; Some of the things that have to be saved very early are saved
; "close" to the initial stack pointer offset, in order to
; reduce the code size...
;
-StackBuf equ STACK_TOP-44 ; Start the stack here (grow down - 4K)
+
+StackBuf equ STACK_TOP-44-92 ; Start the stack here (grow down - 4K)
+PartInfo equ StackBuf
+.mbr equ PartInfo
+.gptlen equ PartInfo+16
+.gpt equ PartInfo+20
+FloppyTable equ PartInfo+76
+; Total size of PartInfo + FloppyTable == 76+16 = 92 bytes
Hidden equ StackBuf-20 ; Partition offset
OrigFDCTabPtr equ StackBuf-12 ; The 2nd high dword on the stack
OrigESDI equ StackBuf-8 ; The high dword on the stack