This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: BUG: ld rejects C style comments


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]