WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Cross-compilation fixes (x86/64 on i386).

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Cross-compilation fixes (x86/64 on i386).
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 26 Feb 2006 10:48:06 +0000
Delivery-date: Sun, 26 Feb 2006 10:48:18 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID a5830f7fd7e063dbc93505557a7856feb7f2bacf
# Parent  0d7c3c47ad200ae3317a92deaf1dcb68a7751aaa
Cross-compilation fixes (x86/64 on i386).

Use strtoull to parse the final_exec_addr value from the command
line. Whe cross compiling on i386 for x86-64 unsigned long is 32 bit,
which leads to final_exec_addr being truncated to 32 bits by strtoul,
which leads to grub refusing to load the resulting image. Please
apply.

Use the target nm(1) when cross compiling to pick the _end address
from the Xen binary.

Signed-Off-By: Muli Ben-Yehuda <mulix@xxxxxxxxx>

diff -r 0d7c3c47ad20 -r a5830f7fd7e0 xen/arch/x86/Makefile
--- a/xen/arch/x86/Makefile     Sat Feb 25 21:29:18 2006
+++ b/xen/arch/x86/Makefile     Sun Feb 26 09:42:07 2006
@@ -44,7 +44,7 @@
 
 $(TARGET): $(TARGET)-syms boot/mkelf32
        ./boot/mkelf32 $(TARGET)-syms $(TARGET) 0x100000 \
-       `nm $(TARGET)-syms | sort | tail -n 1 | sed -e 's/^\([^ ]*\).*/0x\1/'`
+       `$(NM) $(TARGET)-syms | sort | tail -n 1 | sed -e 's/^\([^ 
]*\).*/0x\1/'`
 
 $(CURDIR)/arch.o: $(OBJS)
        $(LD) $(LDFLAGS) -r -o $@ $(OBJS)
diff -r 0d7c3c47ad20 -r a5830f7fd7e0 xen/arch/x86/boot/mkelf32.c
--- a/xen/arch/x86/boot/mkelf32.c       Sat Feb 25 21:29:18 2006
+++ b/xen/arch/x86/boot/mkelf32.c       Sun Feb 26 09:42:07 2006
@@ -244,7 +244,7 @@
 
     inimage  = argv[1];
     outimage = argv[2];
-    loadbase = strtoul(argv[3], NULL, 16);
+    loadbase = strtoull(argv[3], NULL, 16);
     final_exec_addr = strtoul(argv[4], NULL, 16);
 
     infd = open(inimage, O_RDONLY);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Cross-compilation fixes (x86/64 on i386)., Xen patchbot -unstable <=