Let's hope no one has section names starting with '/' in scripts. If
they do, this change to fix parsing of '/' in expressiongs will break
their project.
PR 24411
ldlex.l (SYMBOLNAMECHAR1): Don't match '/'.
(<EXPRESSION>"/DISCARD/"): New.
+2019-04-03 Alan Modra <amodra@gmail.com>
+
+ PR 24411
+ ldlex.l (SYMBOLNAMECHAR1): Don't match '/'.
+ (<EXPRESSION>"/DISCARD/"): New.
+
2019-04-03 Alan Modra <amodra@gmail.com>
* ldlex.l: Formatting.
NOCFILENAMECHAR [_a-zA-Z0-9\/\.\\\$\~\-\+\:\[\]]
SYMBOLNAMECHAR [_a-zA-Z0-9\/\.\\\$\~]
FILENAMECHAR1 [_a-zA-Z\/\.\\\$\~]
-SYMBOLNAMECHAR1 [_a-zA-Z\/\.\\\$]
+SYMBOLNAMECHAR1 [_a-zA-Z\.\\\$]
WHITE [ \t\n\r]+
V_TAG [.$_a-zA-Z][._a-zA-Z0-9]*
yylval.name = xstrdup (yytext);
return NAME;
}
+<EXPRESSION>"/DISCARD/" {
+ yylval.name = xstrdup (yytext);
+ return NAME;
+ }
<EXPRESSION>"-l"{NOCFILENAMECHAR}+ {
yylval.name = xstrdup (yytext + 2);
return LNAME;