Link problem when working with array and Object
Andrew Haley
aph@pasanda.cygnus.co.uk
Tue Sep 7 03:30:00 GMT 1999
> Date: Mon, 6 Sep 1999 13:26:44 -0700 (PDT)
> From: Anthony Green <green@cygnus.com>
>
> Eric wrote:
> > javac Pepe.java (OK)
>
> You can use `gcj -C' in place of javac here.
>
> > func__4PepePQ34java4lang6ObjectPt6JArray1ZiN21 (signatute of fun in Pepe.o)
> > func__4PepePQ34java4lang6ObjectPt6JArray1ZiT1T1 (signature of fun in
> > PepeImp.o)
>
> I was able to reproduce this bug. Could you please file a bug report?
We've seen this before: see the mail below. I tracked it down to a
bug in the C++ name mangling code. It turns out that the Java and C++
name mangling use totally different routines.
What I want to do is unify the C++ and Java name mangling code so that
it will be consistent across languages. The best way to do that is to
put mangling into a common library. The C++ guys might agree to this.
Andrew.
-------------------------------------------------------------------------------
Return-Path: <java-discuss-return-533-aph=cygnus.co.uk@sourceware.cygnus.com>
Mailing-List: contact java-discuss-help@sourceware.cygnus.com; run by ezmlm
Precedence: bulk
Sender: java-discuss-owner@sourceware.cygnus.com
Delivered-To: mailing list java-discuss@sourceware.cygnus.com
Date: Mon, 28 Jun 1999 09:28:24 -0700
From: Tom Tromey <tromey@cygnus.com>
To: Simon Gornall <simon@unique-id.com>
Cc: java discuss <java-discuss@sourceware.cygnus.com>
Subject: Re: Arguments to native functions (?) [a bit long]
In-Reply-To: <37779637.F13124E1@unique-id.com>
References: <37779637.F13124E1@unique-id.com>
X-Zippy: .. the MYSTERIANS are in here with my CORDUROY SOAP DISH!!
X-Attribution: Tom
>>>>> "Simon" == Simon Gornall <simon@unique-id.com> writes:
Simon> Anyway, if I call a native function with more than 3 arguments
Simon> I get a compile-time error saying the linker can't find the
Simon> native function.
I see this too. (And, Andrew, using -fvtable-thunks doesn't help.)
Here is what I see when I run nm on your failing test (modified to
have 4 arguments and not 5):
creche. nm nTest.o | grep calltest
00000000 T calltest__4testPQ34java4lang6StringiT1T1
creche. nm test.o | grep calltest
00000096 d _Utf7calltest
U calltest__4testPQ34java4lang6StringiN21
To me it looks like there is some kind of bug in name mangling.
Tom
More information about the Java
mailing list