This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Eat newlines in INPUT statements


The ld-script lexer didn't have a rule for newlines inside INPUT
statements, so it fell through to the default action which is to print
the current input to stdout.

Andreas.

	PR ld/18344
	* ldlex.l (INPUTLIST): Increment lineno on newline.
---
 ld/ldlex.l | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ld/ldlex.l b/ld/ldlex.l
index a19c5d6..d9ef830 100644
--- a/ld/ldlex.l
+++ b/ld/ldlex.l
@@ -450,7 +450,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
 				  return *yytext;
 				}
 
-<VERS_START,VERS_NODE,VERS_SCRIPT>[\n]		{ lineno++; }
+<VERS_START,VERS_NODE,VERS_SCRIPT,INPUTLIST>[\n]	{ lineno++; }
 
 <VERS_START,VERS_NODE,VERS_SCRIPT>#.*		{ /* Eat up comments */ }
 
-- 
2.3.7

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]