From: Fausto Saporito <fausap@libero.it>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] PPC linking error
Date: Sat, 04 Mar 2006 11:39:51 +0100 [thread overview]
Message-ID: <1141468791.31085.27.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.GSO.4.44.0603031816340.16523-100000@elaine42.Stanford.EDU>
[-- Attachment #1: Type: text/plain, Size: 2363 bytes --]
Hello all,
I have this problem during linking qemu under Ubuntu 5.10 (linux-ppc).
The system is up to date, and I'm using the gcc-3.4 as you can see.
gcc-3.4 -g -Wl,-T,/home/fausap/qemu/ppc.ld -o qemu-i386 elfload.o main.o
syscall.o mmap.o signal.o path.o osdep.o thunk.o vm86.o libqemu.a
gdbstub.o -lm
/usr/bin/ld: qemu-i386: Not enough room for program headers (allocated
8, need 9)
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[1]: *** [qemu-i386] Error 1
make[1]: Leaving directory `/home/fausap/qemu/i386-user'
make: *** [all] Error 1
The problem is in ppd.ld with SIZEOF_HEADERS variable. I fixed it
copying the standard linker script elfppc32.x from /usr/lib/ldscripts in
the qemu directory renaming it as ppc.ld
Now the link is ok.
After, I have a problem with an ASM instruction:
make[1]: Entering directory `/home/fausap/qemu/arm-user'
gcc-3.4 -Wall -O2 -g -fno-strict-aliasing -D__powerpc__ -I.
-I/home/fausap/qemu/target-arm -I/home/fausap/qemu
-I/home/fausap/qemu/linux-user -I/home/fausap/qemu/linux-user/arm
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-I/home/fausap/qemu/fpu -I/home/fausap/qemu/slirp -c -o
elfload.o /home/fausap/qemu/linux-user/elfload.c
/home/fausap/qemu/linux-user/elfload.c: In function `load_elf_binary':
/home/fausap/qemu/cpu-all.h:253: error: inconsistent operand constraints
in an `asm'
/home/fausap/qemu/cpu-all.h:253: error: inconsistent operand constraints
in an `asm'
make[1]: *** [elfload.o] Error 1
Now, finding in other sources the occurence of stwbrx asm operand, I saw
there's no need of "=m" operand in the __asm__ call.
Also, in the qemu code, the function is declared return void in the
cpu-all.h file.
So i changed the line in :
__asm__ __volatile__ ("stwbrx %0,0,%1" : : "r" (v), "r" (ptr));
The same I did for the 16bit version:
__asm__ __volatile__ ("sthbrx %0,0,%1" : : "r" (v), "r" (ptr));
and all has gone fine.
Then there's a missing include in exec.h in target-mips directory,
otherwise there's no way to recognize int32_t type.
In file included from /home/fausap/qemu/target-mips/op_helper.c:21:
/home/fausap/qemu/target-mips/exec.h:15: error: parse error before
"host_int_t"
I added in target-mips/exec.h the line:
#include <stdint.h>
After that I had no further errors... all went fine :-)
thanks in advance,
Fausto
[-- Attachment #2: Type: text/html, Size: 2922 bytes --]
next prev parent reply other threads:[~2006-03-04 10:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-04 2:18 [Qemu-devel] [PATCH] Set SO_REUSEADDR at the right time Nickolai Zeldovich
2006-03-04 10:39 ` Fausto Saporito [this message]
2006-03-05 10:53 ` [Qemu-devel] PPC linking error Mulyadi Santosa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1141468791.31085.27.camel@localhost.localdomain \
--to=fausap@libero.it \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).