diff options
author | Alan Modra <amodra@gmail.com> | 2019-04-03 11:21:36 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-04-03 13:01:49 +1030 |
commit | 1c6aafe894645ca1da5c0dd0661bca19caf37ad0 (patch) | |
tree | f1a60055e68ffa23a1f51cfa90a0df900296b180 /ld/ldlex.l | |
parent | 092da96ac4fc1bfa4c794320f538edb4e8d4fcfd (diff) | |
download | gdb-1c6aafe894645ca1da5c0dd0661bca19caf37ad0.zip gdb-1c6aafe894645ca1da5c0dd0661bca19caf37ad0.tar.gz gdb-1c6aafe894645ca1da5c0dd0661bca19caf37ad0.tar.bz2 |
PR24411, Division is not accepted in MEMORY length expression
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.
Diffstat (limited to 'ld/ldlex.l')
-rw-r--r-- | ld/ldlex.l | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -96,7 +96,7 @@ FILENAMECHAR [_a-zA-Z0-9\/\.\\\$\~\-\+\:\[\]\,\=] 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]* @@ -388,6 +388,10 @@ V_IDENTIFIER [*?.$_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; |