fix mkelf32 when cross compiling on i386 for x86-64
PATCH 1/1 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 <[email protected]>
xen/arch/x86/boot/mkelf32.c +1 -1
@@ -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 )
Signature · 2 lines
Muli Ben-Yehuda http://www.mulix.org | http://mulix.livejournal.com/
thanks, worked on cross compile w/ x86_64 target system
--------------------------------------------
Quoted 7 lines · Muli Ben-Yehuda
fix mkelf32 when cross compiling on
i386 for x86-64
Date:
Sat, 25 Feb 2006 19:27:15 +0200
(09:27 PST)
Signature · 6 lines
Sincerely, Woody Marvel IBM Linux Technology Center Open Source Virtualization email: [email protected] 503-578-3833 Beaverton, OR 97006 **********************************