This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Override arm-elf-as comment char
- To: Jonathan Larmour <jlarmour at cygnus dot co dot uk>
- Subject: Re: Override arm-elf-as comment char
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Thu, 14 Oct 1999 10:04:32 +0100
- Cc: binutils at sourceware dot cygnus dot com
- Cc: richard dot earnshaw at arm dot com
- Organization: ARM Ltd.
- Reply-To: richard dot earnshaw at arm dot com
> There seems to be a conflict in the arm-elf-as syntax. gas/config/tc-arm.c
> has '@' listed as a comment character. Unfortunately gas/config/obj-elf.c
> requires the use of '@' in order to specify @nobits or @progbits options to
> the .section pseudo-op.
>
> I've pored over gas/app.c, but can't find any way to escape the '@' so it
> gets passed through.
>
> This should be fixed, otherwise it's impossible to mark sections as
> equivalent to the BSS. But what should give? Presumably '@' is a comment
> character for compatibility with the ARM SDT? So should we instead change
> app.c to allow the escape any character?
>
When I originally ported gas to the ARM it was designed to be
substantially compatible with the assembler for RISC iX (Acorn's Unix
port). This used @ as the assembler comment character (it had other
wierdnesses too, such as the way .align was implemented). This was the
format that gcc was generating for a.out targets. Of course, since then a
large amount of assembler has been written that assumes that @ is the
comment char, so I doubt it would be feasible to change it now, even for
just elf ports.
I've seen other similar problems in the past; netbsd has a .type directive
which normally expects @<function-name> as an argument; the solution
adopted was to use a different character in .type rather than try to hack
the assembler not to introduce a comment for some uses of @.
ARM SDT compatibility is not an issue. The syntax used by the SDT
assembler is, unfortunately, completely different from that used in gas
and not very compatible with the way gas is designed.
Richard