This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcj, libgcj, and GNU JVM for AIX
- From: Tom Tromey <tromey at redhat dot com>
- To: "Hill, Dean L" <DHill4 at LNC dot com>
- Cc: <java at gcc dot gnu dot org>
- Date: 05 Jan 2004 12:08:16 -0700
- Subject: Re: gcj, libgcj, and GNU JVM for AIX
- References: <495E6BD8A817CC41AB795167CE14DECB044A06@fwameml016.lnc.com>
- Reply-to: tromey at redhat dot com
>>>>> "Dean" == Hill, Dean L <DHill4@LNC.com> writes:
Dean> /tmp//ccWqD8w2.s: line 1713: 1252-142 Syntax error.
Dean> To diagnose the problem, I had the compiler generate the
Dean> assembler source (prims.s). Then I used the gcc assembler to
Dean> assemble prims.s. I got the same syntax errors. Inspecting the
Dean> offending lines, we noticed some dollar signs "$", e.g.:
Dean> .tc _ZN4java4lang30ArrayIndexOutOfBoundsException6class$ETC],_ZN4java4lang30ArrayIndexOutOfBoundsException6class$E[RW]
Dean> I manually removed the dollar signs from each line and the file
Dean> assembled fine. So, why does prims.cc generate prims.s with
Dean> dollar signs in symbol names?
The short answer is that this is the convention we picked. It's sort
of an arbitrary choice, I think.
But, note that due to how inner classes are named, you're going to
wind up with "$" in identifiers even if you change gcj to avoid "$"
in this particular case.
I suppose it would be possible to change gcj to rewrite all these
dollar signs as well. I haven't looked into it, since we never had a
problem with this before.
Note that you'd still need to accept "$" in C++ source files, since
they appear in gcjh-generated header files, and we want these headers
to remain platform-independent.
Dean> I tried changing the c++ option -fdollars-in-identifiers to
Dean> -fno-dollars-in-identifiers with no change in the generated
Dean> assembler code.
As I understand it, this flag changes the behavior of the front end,
but not the output.
Dean> How do I have the c++ compiler NOT generate dollar signs in the
Dean> assembler code?
One idea is to use gas instead:
* Even if you specify `-fdollars-in-identifiers', you cannot
successfully use `$' in identifiers on the RS/6000 due to a
restriction in the IBM assembler. GAS supports these identifiers.
Alternatively you could come up with a "$"-rewriting patch for gcj and
g++.
Tom