isolinux: protect bss variables clobbered due to final sector load
authorH. Peter Anvin <hpa@zytor.com>
Wed, 7 Nov 2007 01:14:03 +0000 (17:14 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 7 Nov 2007 01:14:03 +0000 (17:14 -0800)
The image size loaded is bigger than the real image; this is due to
the final sector being fractional.  Move variables needed during that
stage from .bss to .bss1.

XXX: Need to audit to make sure this doesn't affect other derivatives
and/or other variables, too.

isolinux.asm

index 5ae5e05..3ede48f 100644 (file)
@@ -105,7 +105,11 @@ trackbuf   resb trackbufsize       ; Track buffer goes here
 getcbuf                resb trackbufsize
 ;              ends at 4800h
 
-               section .bss
+               ; Some of these are touched before the whole image
+               ; is loaded.  DO NOT move this to .bss, since the beginning
+               ; of .bss might be clobbered when loading the last fractional
+               ; sector.
+               section .bss1
                alignb 4
 ISOFileName    resb 64                 ; ISO filename canonicalization buffer
 ISOFileNameEnd equ $