This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: BUG: ld rejects C style comments
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Flavio Ribeiro <fr at ime dot usp dot br>
- Cc: bug-binutils at gnu dot org, binutils at sources dot redhat dot com
- Date: Mon, 05 May 2003 15:56:24 +0930
- Subject: Re: BUG: ld rejects C style comments
- References: <3EB40CBC.7040003@ime.usp.br>
On Sat, May 03, 2003 at 03:38:52PM -0300, Flavio Ribeiro wrote:
> ld's info page says that VERSION scripts may have C style comments
> delimited by '/*' and '*/', but ld fails with errors such as this:
[snip]
It's probably easier to actually fix the lexer than to fix ld's
documentation, and I don't see any reason to not support comments..
* ldlex.l: Accept C style comments in version scripts.
Applying mainline.
Index: ld/ldlex.l
===================================================================
RCS file: /cvs/src/src/ld/ldlex.l,v
retrieving revision 1.18
diff -u -p -r1.18 ldlex.l
--- ld/ldlex.l 15 Apr 2003 14:50:29 -0000 1.18
+++ ld/ldlex.l 5 May 2003 06:24:15 -0000
@@ -144,7 +144,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^]([*?
}
}
-<BOTH,SCRIPT,EXPRESSION>"/*" { comment(); }
+<BOTH,SCRIPT,EXPRESSION,VERS_START,VERS_NODE,VERS_SCRIPT>"/*" { comment(); }
<DEFSYMEXP>"-" { RTOKEN('-');}
--
Alan Modra
IBM OzLabs - Linux Technology Centre