[syslinux:master] core: move PartInfo back to the top of stack

syslinux-bot for H. Peter Anvin hpa at zytor.com
Sat Jun 26 20:42:02 PDT 2010


Commit-ID:  2d3c94d753dc27040c4ea93550429e231a205181
Gitweb:     http://syslinux.zytor.com/commit/2d3c94d753dc27040c4ea93550429e231a205181
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Sat, 26 Jun 2010 20:38:04 -0700
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Sat, 26 Jun 2010 20:38:04 -0700

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


---
 core/diskstart.inc |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/core/diskstart.inc b/core/diskstart.inc
index 7bb47dc..bd819a9 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



More information about the Syslinux-commits mailing list