* Another ld script backtrack
@ 2021-08-18 4:08 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2021-08-18 4:08 UTC (permalink / raw)
To: binutils
Another case where an expression might be following by a NAME.
* ldgram.y (length_spec): Throw away look-ahead NAME.
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;
}
;
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-18 4:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 4:08 Another ld script backtrack Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).