PATCH COMMITTED: Fix version scripts to allow ?

Craig Silverstein csilvers@google.com
Mon Jun 30 21:50:00 GMT 2008
Version scripts are supposed to allow filenames with arbitrary glob
patterns, but somehow someone (OK, it was me) forgot to include '?' in
this list, when originally writing the code.  This patch fixes it.
Change was approved off-line by Ian Taylor.

craig

--cut here--

	* script.cc (Lex::can_continue_name): make '?' allowable in
	version-script names.
	* testsuite/version_script.map: change glob pattern to use '?'

Index: script.cc
===================================================================
RCS file: /cvs/src/src/gold/script.cc,v
retrieving revision 1.43
diff -u -r1.43 script.cc
--- script.cc	21 May 2008 21:37:44 -0000	1.43
+++ script.cc	26 Jun 2008 05:45:44 -0000
@@ -431,12 +431,12 @@
 
     case '/': case '\\': case '~':
     case '=': case '+':
-    case ',': case '?': 
+    case ',':
       if (this->mode_ == LINKER_SCRIPT)
         return c + 1;
       return NULL;
 
-    case '[': case ']': case '*': case '-':
+    case '[': case ']': case '*': case '?': case '-':
       if (this->mode_ == LINKER_SCRIPT || this->mode_ == VERSION_SCRIPT)
         return c + 1;
       return NULL;
Index: testsuite/version_script.map
===================================================================
RCS file: /cvs/src/src/gold/testsuite/version_script.map,v
retrieving revision 1.3
diff -u -r1.3 version_script.map
--- testsuite/version_script.map	24 Jan 2008 00:15:00 -0000	1.3
+++ testsuite/version_script.map	26 Jun 2008 05:45:44 -0000
@@ -17,7 +17,7 @@
 	SECTIONS;
 	sizeof_headers;
 	# Crazy globbiness
-	glob*f[^A-Zo]stuff;
+	glob*f[^A-Zo]st?ff;
 
    local:
         *foo*;



More information about the Binutils mailing list