diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-05-13 22:05:41 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-05-13 22:05:41 -0700 |
commit | 95a461a83adf65aa5689b65f85330ce970121f56 (patch) | |
tree | de8455836beab1ca73014bf57a0e855542577574 /core/ldlinux.asm | |
parent | 376a2bfe09b8292140d7a40ce77a1cc7f4316e17 (diff) | |
download | syslinux-95a461a83adf65aa5689b65f85330ce970121f56.tar.gz |
core: zero bss and uibss; fix some section confusions
Set .bss and .uibss as soon as we are fully loaded. This gives us the
more familiar behavior of most normal execution environments. The
.earlybss section is not zeroed; therefore, all variables that are set
before we have the opportunity to zero need to go in this section.
This checkin also fixes some incorrect section directives.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/ldlinux.asm')
-rw-r--r-- | core/ldlinux.asm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/ldlinux.asm b/core/ldlinux.asm index 92dc6da3..a37437c2 100644 --- a/core/ldlinux.asm +++ b/core/ldlinux.asm @@ -127,7 +127,6 @@ TotalSectors resd 1 ; Total number of sectors ClustSize resd 1 ; Bytes/cluster ClustMask resd 1 ; Sectors/cluster - 1 CopySuper resb 1 ; Distinguish .bs versus .bss -DriveNumber resb 1 ; BIOS drive number ClustShift resb 1 ; Shift count for sectors/cluster ClustByteShift resb 1 ; Shift count for bytes/cluster @@ -140,6 +139,12 @@ Files resb MAX_OPEN*open_file_t_size %include "diskstart.inc" ; +; Common initialization code +; +%include "init.inc" +%include "cpuinit.inc" + +; ; Compute some information about this filesystem. ; @@ -212,11 +217,6 @@ getfattype: .setsize: mov byte [nextcluster+1],cl -; -; Common initialization code -; -%include "cpuinit.inc" -%include "init.inc" ; ; Initialize the metadata cache @@ -231,8 +231,8 @@ getfattype: mov di,kaboom.patch mov al,0e9h stosb - mov ax,kaboom2-3 - sub ax,bx + mov ax,kaboom2-2 + sub ax,di stosw ; |