[patch]: ld version script grammar failures
Michael Matz
matz@ifh.de
Sun Jun 4 17:56:00 GMT 2000
Hi,
as I now and then read binutils@ archives I saw that a 2.10 release is
near. Good :) As I pointed out some weeks ago, ld has problems with the
C++ symbols support in version scripts. In the branch, and in HEAD. It
segfaults for version scripts containing 'extern "C++" { bla }'
directives. This is due to a wrong yacc rule (patch for ldgram.y).
And it doesn't recognize '::' in those C++ symbols, due to too restrictive
LEX symbols definitions (second patch for ldlex.l). I hope it's not too
late for the branch, as I wanted to finally use a released version with
C++ version scripts :)
Ciao,
Michael.
--
--- /big/2/src/cygnus/sourceware/src/ld/ldgram.y Mon Mar 6 03:26:13 2000
+++ ldgram.y Wed May 17 01:31:20 2000
@@ -1113,6 +1113,7 @@
}
vers_defns '}'
{
+ $$ = $5;
ldgram_vers_current_lang = $<name>4;
}
;
--- /big/2/src/cygnus/sourceware/src/ld/ldlex.l Mon May 3 09:29:06 1999
+++ ldlex.l Wed May 17 01:26:45 2000
@@ -115,7 +115,7 @@
NOCFILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\$\:\[\]\\\~]
V_TAG [.$_a-zA-Z][._a-zA-Z0-9]*
-V_IDENTIFIER [*?.$_a-zA-Z][*?.$_a-zA-Z0-9]*
+V_IDENTIFIER [*?.$_a-zA-Z]([*?.$_a-zA-Z0-9]|::)*
%s SCRIPT
%s EXPRESSION
More information about the Binutils
mailing list