Subject: Re: new ldscript and Xen
To: Pavel Cahyna <pavel@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-i386
Date: 05/28/2006 12:34:18
On Sun, May 28, 2006 at 12:15:24PM +0200, Manuel Bouyer wrote:
> On Sun, May 28, 2006 at 12:03:25PM +0200, Manuel Bouyer wrote:
> > On Sun, May 28, 2006 at 01:42:02AM +0200, Pavel Cahyna wrote:
> > > I bet the
> > > /local/pop1/bouyer/tmp/i386/obj/local/pop1/bouyer/current/src/tooldir/bin/i386--netbsdelf-ld
> > > is out of date.
> > > 
> > > You need to update gnu/dist/binutils/ld and recompile your linker.
> > 
> > Yes, with up-to-date tools it builds fine.
> > 
> > Unfortunably now a Xen3 dom0 kernel fails to load with:
> > (XEN) *** LOADING DOMAIN 0 ***
> > (XEN) Malformed ELF image.
> > 
> > Attached is the Xen source file from where this message comes.
> > Any idea ?
> 
> An Xen3 domU kernel also fails to load with the new script. Reverting to
> the old one makes things working again.

I added some debug printf to Xen and here's the result:
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Malformed ELF image kernstart=0x100000 kernend=0x93d538 ehdr->e_entry=0xc0100000

Is there something in the Makefile we can test to use a different script
for Xen ? Or can the ld script to test itself ?
Xen kernels have a __xen_guest section (defined in locore.S)

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--