]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* ld.texinfo (VERSION scripts): Symbol names are globbing patterns.
authorAlan Modra <amodra@gmail.com>
Thu, 14 Feb 2002 04:25:55 +0000 (04:25 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 14 Feb 2002 04:25:55 +0000 (04:25 +0000)
* ldgram.y (lang_new_vers_regex):  Rename to lang_new_vers_pattern;
the pattern in question is not a regexp.
* ldlang.c:  Likewise.
* ldlang.h:  Likewise.
* ldlex.l (V_IDENTIFIER):  Allow '[', ']', '-', '!', and '^' also.

ld/ChangeLog
ld/ld.texinfo
ld/ldgram.y
ld/ldlang.c
ld/ldlang.h
ld/ldlex.l

index 112f73bdb356e7dfbd0e9ff405cbab0595000e18..2e3e9f43832afe214c0663e8e1e6f77b90408e8c 100644 (file)
@@ -1,3 +1,12 @@
+2002-02-14  Phil Edwards  <pme@gcc.gnu.org>
+
+       * ld.texinfo (VERSION scripts):  Symbol names are globbing patterns.   
+       * ldgram.y (lang_new_vers_regex):  Rename to lang_new_vers_pattern;
+       the pattern in question is not a regexp.
+       * ldlang.c:  Likewise.
+       * ldlang.h:  Likewise.
+       * ldlex.l (V_IDENTIFIER):  Allow '[', ']', '-', '!', and '^' also.
+
 2002-02-10  Daniel Jacobowitz  <drow@mvista.com>
 
        * lexsup.c: Remove strtoul declaration.
index 78afbbe95c6e9b6f93e450d00d8f387cd4f727b6..873712616190436d74f60855a1d56959d2eacb57 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo
 @setfilename ld.info
 @c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-@c 2001 Free Software Foundation, Inc.
+@c 2001, 2002 Free Software Foundation, Inc.
 @syncodeindex ky cp
 @include configdoc.texi
 @c (configdoc.texi is generated by the Makefile)
@@ -58,7 +58,7 @@ END-INFO-DIR-ENTRY
 This file documents the @sc{gnu} linker LD version @value{VERSION}.
 
 Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001 Free Software Foundation, Inc.
+2001, 2002 Free Software Foundation, Inc.
 
 @ignore
 
@@ -3672,7 +3672,10 @@ This example version script defines three version nodes.  The first
 version node defined is @samp{VERS_1.1}; it has no other dependencies.
 The script binds the symbol @samp{foo1} to @samp{VERS_1.1}.  It reduces
 a number of symbols to local scope so that they are not visible outside
-of the shared library.
+of the shared library; this is done using wildcard patterns, so that any
+symbol whose name begins with @samp{old}, @samp{original}, or @samp{new}
+is matched.  The wildcard patterns available are the same as those used
+in the shell when matching filenames (also known as ``globbing'').
 
 Next, the version script defines node @samp{VERS_1.2}.  This node
 depends upon @samp{VERS_1.1}.  The script binds the symbol @samp{foo2}
index f1924a0069efd8e1269da615b42773685397a24f..22dc1a85e5313aefabb8963ea80aa871a400e381 100644 (file)
@@ -1112,11 +1112,11 @@ vers_tag:
 vers_defns:
                VERS_IDENTIFIER
                {
-                 $$ = lang_new_vers_regex (NULL, $1, ldgram_vers_current_lang);
+                 $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang);
                }
        |       vers_defns ';' VERS_IDENTIFIER
                {
-                 $$ = lang_new_vers_regex ($1, $3, ldgram_vers_current_lang);
+                 $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang);
                }
        |       EXTERN NAME '{'
                        {
index bc705adcc0e0b6955e42568426018c0316459ec8..a5b1dd7e7e6f336068c6036a2be7be0913f169ae 100644 (file)
@@ -4981,7 +4981,7 @@ lang_vers_match_lang_java (expr, sym)
 /* This is called for each variable name or match expression.  */
 
 struct bfd_elf_version_expr *
-lang_new_vers_regex (orig, new, lang)
+lang_new_vers_pattern (orig, new, lang)
      struct bfd_elf_version_expr *orig;
      const char *new;
      const char *lang;
@@ -5154,7 +5154,7 @@ lang_do_version_exports_section ()
       p = contents;
       while (p < contents + len)
        {
-         greg = lang_new_vers_regex (greg, p, NULL);
+         greg = lang_new_vers_pattern (greg, p, NULL);
          p = strchr (p, '\0') + 1;
        }
 
@@ -5165,7 +5165,7 @@ lang_do_version_exports_section ()
        bfd_get_section_flags (is->the_bfd, sec) | SEC_EXCLUDE);
     }
 
-  lreg = lang_new_vers_regex (NULL, "*", NULL);
+  lreg = lang_new_vers_pattern (NULL, "*", NULL);
   lang_register_vers_node (command_line.version_exports_section,
                           lang_new_vers_node (greg, lreg), NULL);
 }
index 5e50c5cde1b30170a4d0de3e88ff6f21bcea4943..20895917ea7e286c6488f496e81ed8cb971219b5 100644 (file)
@@ -463,7 +463,7 @@ extern void lang_leave_overlay
 
 extern struct bfd_elf_version_tree *lang_elf_version_info;
 
-extern struct bfd_elf_version_expr *lang_new_vers_regex
+extern struct bfd_elf_version_expr *lang_new_vers_pattern
   PARAMS ((struct bfd_elf_version_expr *, const char *, const char *));
 extern struct bfd_elf_version_tree *lang_new_vers_node
   PARAMS ((struct bfd_elf_version_expr *, struct bfd_elf_version_expr *));
index 0b15ca2fab6000023f765f5959fb9ff8e942babe..5b97f138eb0a421806607bb8180419aa4b77fbdc 100644 (file)
@@ -116,7 +116,7 @@ WHITE               [ \t\n\r]+
 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