[syslinux] mysteries of memdisk code

Andreas Kotes count-linux at flatline.de
Tue Jun 17 23:38:46 PDT 2008


Hallo,

some wild guesses which may help you right now and may be clarified by
hpa later on:

* Loginov Alexander <aloginov at asmpt.com> [20080618 08:11]:
> 1)       _binary_memdisk_bin_start[], _binary_memdisk_bin_end[] and
> _binary_memdisk_bin_size[]; These variables are declared (as extern
> const chat in 'setup.c') but never defined in the code. Yet, it seems
> that somehow they are initialized with the size and start address of
> memdisk. How can it be?

most likely, the linker does that ... have a look at the linker script
and what happens in that area :)

> 2)       What is driverptr (declared in setup())? It is defined as
> driverptr = driverseg  << 16; Why is it shifted by 16-bits?

no idea what it is, but name and shifting seem to be related to
http://en.wikipedia.org/wiki/X86_memory_segmentation

Hope that helps you for the moment ...

   Andreas

-- 
flatline IT services - A.Kotes - IT-consulting for ISPs & Internet services




More information about the Syslinux mailing list