From a3e8dd2ad3bce85d550b131cb12b5250ac830faa Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 17 Aug 2021 15:52:20 +0930 Subject: [PATCH] Another ld script backtrack * ldgram.y (length_spec): Throw away look-ahead NAME. --- ld/ldgram.y | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ld/ldgram.y b/ld/ldgram.y index a0c881e9a73..c8396bbfd5b 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; } ; -- 2.30.2