[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] sparc-user build error
From: |
Johannes Schindelin |
Subject: |
Re: [Qemu-devel] sparc-user build error |
Date: |
Sun, 10 Oct 2004 19:50:54 +0200 (CEST) |
Hi,
On Sun, 10 Oct 2004, Magnus Damm wrote:
> I'm unable to build sparc-user on my powerpc box. I use gcc-3.4.1 from
> Gentoo stable ppc, and I'm building the CVS version of QEMU.
>
> [...]
>
> op.h:
>
> case INDEX_op_fitos: {
> extern void op_fitos();
> memcpy(gen_code_ptr, (void *)((char *)&op_fitos+0), 56);
> *(uint16_t *)(gen_code_ptr + 18) = ((long)(&) + 0 + 0x8000) >> 16;
> *(uint16_t *)(gen_code_ptr + 26) = ((long)(&) + 0);
> gen_code_ptr += 56;
> }
> break;
>
> The same goes for "op_fitod". Look at the "(long)(&)", any ideas?
It's a similar problem to
http://lists.gnu.org/archive/html/qemu-devel/2004-10/msg00092.html
You are building on i386, right? Then try to add the lines
if (strstart(sym_name, "__op_param", &p)) {
snprintf(name, sizeof(name), "param%s", p);
+ } else if(sym_name[0]==0) {
+ continue;
} else {
snprintf(name, sizeof(name), "(long)(&%s)",
sym_name);
}
in dyngen.c at line 1643 (the two lines to be added are the ones with a
'+' at the left).
A bone for general discussion: How many reasons can you think of to patch
relocations other than "__op_param*" and "__op_jump*"?
Ciao,
Dscho