This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: dollars-in-identifiers on ARM, was: Creating and using GCJ ARM cross compiler
- From: Andrew Haley <aph at redhat dot com>
- To: Matthijs van de Water <matthijs dot van dot de dot water at gmail dot com>
- Cc: java at gcc dot gnu dot org
- Date: Mon, 21 Apr 2008 14:03:11 +0100
- Subject: Re: dollars-in-identifiers on ARM, was: Creating and using GCJ ARM cross compiler
- References: <35a670560804210434s60c613d0vcff6033192400b33@mail.gmail.com>
Matthijs van de Water wrote:
> On Fri, Apr 18, 2008 at 7:17 PM, Andrew Haley <aph@redhat.com> wrote:
>>> error: stray '$' in program
>> > [error repeated a lot of times]
>> >
>> > If I add "-fdollars-in-identifiers" to my compile statement, it
>> > completes without error, but I would expect this not to be necessary.
>>
>> Well, it is. For some reason I could never understand, it's needed on arm.
>> I added -fdollars-in-identifiers in several places in the libgcj build.
> The reason for this is probably that gcc/config/arm/aout.h has:
>
> /* Arm Assembler barfs on dollars. */
> #define DOLLARS_IN_IDENTIFIERS 0
No, that's not the reason, it's just the implementation.
> See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24111 which if I
> read it correctly says that what is done with GCJ on ARM violates EABI
> rules...
Indeed, yes:
"4.4.4 Symbol names
"All symbol names containing a dollar character (â$â) are reserved to the ARM EABI."
http://refspecs.freestandards.org/elf/ARMELF.pdf
> Is this something that can/should be fixed?
No. This bug is closed, RESOLVED INVALID. I don't think it should
be fixed. The only reasonable way to fix it IMO is to change the
ARM ELF spec, and that's not at all likely.
Andrew.