From dd80badc521c8b865df8c4b63ebd2f5e2d5b4c4a Mon Sep 17 00:00:00 2001 From: hpa Date: Thu, 5 Apr 2001 06:21:53 +0000 Subject: [PATCH] Actually make NASM enforce the checkpoints. --- ldlinux.asm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ldlinux.asm b/ldlinux.asm index 12ab164..4f02fa0 100644 --- a/ldlinux.asm +++ b/ldlinux.asm @@ -738,6 +738,10 @@ bailmsg: db 'Boot failed', 0Dh, 0Ah, 0 bs_checkpt equ $ ; Must be <= 1EFh +%if (bs_checkpt-$$) > 0x1EF +%error "Boot sector overflow" +%endif + zb 1EFh-($-$$) bs_magic equ $ ; From here to the magic_len equ ; must match ldlinux_magic @@ -1045,6 +1049,10 @@ safedumpregs: rl_checkpt equ $ ; Must be <= 400h +%if (rl_checkpt-$$) > 0x400 +%error "Sector 1 overflow" +%endif + ; ---------------------------------------------------------------------------- ; End of code and data that have to be in the first sector ; ---------------------------------------------------------------------------- -- 2.7.4