[syslinux] mysteries of memdisk code

Loginov Alexander aloginov at asmpt.com
Wed Jun 18 00:46:43 PDT 2008


1) About _binary_memdisk_bin_xxx variables: I guess the reason is in
linking memdisk binary using '-r' (relocatable) switch

Am I correct?

2) The question about 16-bit shifting of driverseg is still open...

Alex


-----Original Message-----
From: syslinux-bounces at zytor.com [mailto:syslinux-bounces at zytor.com] On
Behalf Of Andreas Kotes
Sent: Wednesday, June 18, 2008 2:39 PM
To: For discussion of SYSLINUX and tftp-hpa
Subject: Re: [syslinux] mysteries of memdisk code

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

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX at zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.




More information about the Syslinux mailing list