BUG: ld rejects C style comments
Alan Modra
amodra@bigpond.net.au
Mon May 5 06:28:00 GMT 2003
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
More information about the Binutils
mailing list