[syslinux] [elflink] diskstart.inc:420: error: Sector 1 overflow by 5 bytes
H. Peter Anvin
hpa at zytor.com
Thu Mar 31 13:57:24 PDT 2011
On 03/21/2011 02:51 AM, Matt Fleming wrote:
> Hi Feng,
>
> I'm currently hitting the overflow in core/diskstart.inc on the elfink
> branch where I see you changed the overflow check,
>
> commit 2e91ec5f155f04aee878ed70a04fb5b15e40da3b
> Author: Feng Tang <feng.tang at intel.com>
> Date: Wed Jul 14 15:55:25 2010 +0800
>
> elflink: a lot of core/fs merge
>
>
> @@ -691,16 +798,22 @@ rl_checkpt equ $ ; Must be <= 8000h
>
> rl_checkpt_off equ ($-$$)
> %ifndef DEPEND
> -%if rl_checkpt_off > 3FCh ; Need one pointer in here
> -%error "Sector 1 overflow"
> -%endif
> + %if rl_checkpt_off > 3F6h ; Need one extent
> + %assign rl_checkpt_overflow rl_checkpt_off - 3F6h
> + %error Sector 1 overflow by rl_checkpt_overflow bytes
> + %endif
> %endif
>
> -; Sector pointers
> - alignz 4
> +;
> +; Extent pointers... each extent contains an 8-byte LBA and an 2-byte
> +; sector count. In most cases, we will only ever need a handful of
> +; extents, but we have to assume a maximally fragmented system where each
> +; extent contains only one sector.
> +;
> + alignz 2
> MaxInitDataSize equ 96 << 10
> MaxLMA equ TEXT_START+SECTOR_SIZE+MaxInitDataSize
> -SectorPtrs times MaxInitDataSize >> SECTOR_SHIFT dd 0
> +SectorPtrs zb 10*(MaxInitDataSize >> SECTOR_SHIFT)
> SectorPtrsEnd equ $
>
This isn't Feng's change, but mine; the code changed from having a table
of (32-bit) entires to a list of extents, which are 64-bit LBAs plus a
16-bit count. This speeds up loading significantly, and supports 64-bit
LBAs.
You need a minimum of 10 bytes for a single extent.
-hpa
More information about the Syslinux
mailing list