|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] fix mkelf32 when cross compiling on i386 for x86-64
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.
Signed-Off-By: Muli Ben-Yehuda <mulix@xxxxxxxxx>
diff -r 86eba2e17a39 -r ef4fe9970b03 xen/arch/x86/boot/mkelf32.c
--- a/xen/arch/x86/boot/mkelf32.c Sat Feb 25 18:36:23 2006 +0200
+++ b/xen/arch/x86/boot/mkelf32.c Sat Feb 25 19:07:43 2006 +0200
@@ -245,7 +245,7 @@ int main(int argc, char **argv)
inimage = argv[1];
outimage = argv[2];
loadbase = strtoul(argv[3], NULL, 16);
- final_exec_addr = strtoul(argv[4], NULL, 16);
+ final_exec_addr = strtoull(argv[4], NULL, 16);
infd = open(inimage, O_RDONLY);
if ( infd == -1 )
--
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH] fix mkelf32 when cross compiling on i386 for x86-64,
Muli Ben-Yehuda <=
|
|
|
|
|