Compiling on AMD64
Hi,
there are several warning emitted while compiling on AMD64 target system:
gcc -Wall -O1 -g -D_GNU_SOURCE -o dyngen dyngen.c dyngen.c: In function `gen_code':
dyngen.c:1109: warning: int format, different type arg (arg 4) dyngen.c:1269: warning: int format, different type arg (arg 3) dyngen.c:1273: warning: int format, different type arg (arg 3) dyngen.c:1277: warning: int format, different type arg (arg 3) dyngen.c:1277: warning: int format, different type arg (arg 5)
All those warnings come from
host_ulong start_offset;
fprintf(outfile, " memcpy(gen_code_ptr, (void *)((char *)&%s+%d), %d);\n", name, start_offset - offset, copy_size);where host_ulong (int64_t in case of AMD64) is formatted to %d.
Signature · 4 lines
Pavel Janík
Don't patch bad code - rewrite it.
-- The Elements of Programming Style (Kernighan & Plaugher)Alle Wednesday 02 June 2004 13:25, Pavel Janík ha scritto:
Quoted 4 lines
Hi,
there are several warning emitted while compiling on AMD64 target system:
I was just about to repost yesterday IRC session where i tried to get qemu working on AMD64 ( thanx Pavel!! :-) )
I cannot compile user-i386/* with gcc 3.4 CVS (ok, it is just cvs from 3.4 branch, so it should be gcc 3.4 with bugfixes...) unless i remove the "-O2" compilation flag (this is a gcc bug).
After compiling i got error in
gcc -g -Wl,-T,/home/maurizio/qemu/amd64.ld -o qemu-i386 elfload.o main.o
syscall.o mmap.o signal.o path.o osdep.o thunk.o vm86.o libqemu.a -lm
/usr/bin/ld:/home/maurizio/qemu/amd64.ld:62: parse error
error is on lines 62,63,89, etc of /home/maurizio/qemu/amd64.ld. I tried to reinstall binutils just to be sure (GNU ld version 2.15) but with no succes. it looks like ld doesn't understand ONLY_IF_RO and ONLY_IF_RW, but i can't fixe it because this is the first time i see a .ld file :-)
I hope i am not forgetting anything...
Ciao
Maurizio