aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-08-17 15:52:20 +0930
committerAlan Modra <amodra@gmail.com>2021-08-18 13:36:57 +0930
commita3e8dd2ad3bce85d550b131cb12b5250ac830faa (patch)
treea944281de674f24bb2f8af330463f5b41100e33e
parent9068c4a488dd3857544c92cdb015466a6cc7fb7e (diff)
downloadgdb-a3e8dd2ad3bce85d550b131cb12b5250ac830faa.zip
gdb-a3e8dd2ad3bce85d550b131cb12b5250ac830faa.tar.gz
gdb-a3e8dd2ad3bce85d550b131cb12b5250ac830faa.tar.bz2
Another ld script backtrack
* ldgram.y (length_spec): Throw away look-ahead NAME.
-rw-r--r--ld/ldgram.y5
1 files changed, 5 insertions, 0 deletions
diff --git a/ld/ldgram.y b/ld/ldgram.y
index a0c881e..c8396bb 100644
--- a/ld/ldgram.y
+++ b/ld/ldgram.y
@@ -809,6 +809,11 @@ origin_spec:
length_spec:
LENGTH '=' mustbe_exp
{
+ if (yychar == NAME)
+ {
+ yyclearin;
+ ldlex_backup ();
+ }
region->length_exp = $3;
}
;