Subject: Re: new ldscript and Xen
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Pavel Cahyna <pavel.cahyna@st.mff.cuni.cz>
List: port-i386
Date: 05/28/2006 13:36:47
--zhXaljGHf11kAtnf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Sun, May 28, 2006 at 12:15:24PM +0200, Manuel Bouyer wrote:
> An Xen3 domU kernel also fails to load with the new script. Reverting to
> the old one makes things working again.
Please try the attached patch. Don't forget to rerun config before make.
Could you please also test an i386 kernel with the native bootloader?
Pavel
--zhXaljGHf11kAtnf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="startaddr.patch"
Index: i386/conf/Makefile.i386
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/conf/Makefile.i386,v
retrieving revision 1.144
diff -u -r1.144 Makefile.i386
--- i386/conf/Makefile.i386 4 Apr 2006 03:13:12 -0000 1.144
+++ i386/conf/Makefile.i386 28 May 2006 11:32:22 -0000
@@ -71,6 +71,7 @@
##
TEXTADDR?= c0100000
LINKFLAGS_NORMAL= -X
+LINKENTRY=
.if (${OBJECT_FMT} == "ELF")
KERN_LDSCRIPT?= kern.ldscript
LINKFORMAT= -T ${I386}/conf/${KERN_LDSCRIPT}
Index: i386/conf/kern.ldscript
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/conf/kern.ldscript,v
retrieving revision 1.5
diff -u -r1.5 kern.ldscript
--- i386/conf/kern.ldscript 26 May 2006 09:22:42 -0000 1.5
+++ i386/conf/kern.ldscript 28 May 2006 11:32:22 -0000
@@ -3,9 +3,10 @@
OUTPUT_FORMAT("elf32-i386", "elf32-i386",
"elf32-i386")
OUTPUT_ARCH(i386)
-ENTRY(_start)
+ENTRY(_physstart)
SECTIONS
{
+ _physstart = start & 0x0fffffff ;
/* Read-only sections, merged into text segment: */
.text :
AT (ADDR(.text) & 0x0fffffff)
Index: xen/conf/Makefile.xen
===================================================================
RCS file: /cvsroot/src/sys/arch/xen/conf/Makefile.xen,v
retrieving revision 1.17
diff -u -r1.17 Makefile.xen
--- xen/conf/Makefile.xen 14 May 2006 21:57:13 -0000 1.17
+++ xen/conf/Makefile.xen 28 May 2006 11:32:25 -0000
@@ -87,6 +87,7 @@
##
TEXTADDR?= c0100000
LINKFLAGS_NORMAL= -X
+LINKENTRY=
.if (${OBJECT_FMT} == "ELF")
KERN_LDSCRIPT?= kern.ldscript
LINKFORMAT= -T $S/arch/${XEN_BUILD}/conf/${KERN_LDSCRIPT}
--zhXaljGHf11kAtnf--