This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [libffi] closures for sparc
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jeff Sturm <jsturm at one-point dot com>
- Cc: Andreas Tobler <toa at pop dot agri dot ch>, gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: Mon, 20 Jan 2003 18:01:33 -0500
- Subject: Re: [libffi] closures for sparc
- References: <3E16BD22.4090905@pop.agri.ch> <Pine.LNX.4.44.0301051120480.1133-100000@ops2.one-point.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sun, Jan 05, 2003 at 11:26:30AM -0500, Jeff Sturm wrote:
> On Sat, 4 Jan 2003, Andreas Tobler wrote:
> > Hm, powerpc-unknown-linux-gnu doesn't like the static:
>
> > .libs/ffitest.o: could not read symbols: Bad value
>
> Strange. Surely this isn't a problem in libffi though?
>
> Can you try a newer ld and see if it fixes the problem? If not, let me
> know and I'll attempt a cross build (I don't have a powerpc-linux machine
> handy).
I get the same on ppc-linux. To me this looks like a bug in gcc:
/* { dg-do link } */
/* { dg-options "-O2 -fpic" } */
static char foo [128];
void bar (void)
{
((void (*)(void))foo)();
}
int main ()
{
}
results in:
...
bl foo@plt
...
.lcomm foo,128,4
Note @plt used for local symbol.
Jakub