* elflink.h (elf_link_assign_sym_version): For explicitly versioned
authorRichard Henderson <rth@redhat.com>
Fri, 17 Oct 1997 07:04:28 +0000 (07:04 +0000)
committerRichard Henderson <rth@redhat.com>
Fri, 17 Oct 1997 07:04:28 +0000 (07:04 +0000)
        symbols, check globals list before matching on locals.

bfd/ChangeLog
bfd/elflink.h

index fdef6eacf4e0cbae379c26c32961aaa438fa1447..ba65a889ae7cc38501b7d30bb92fe7cb4631abb9 100644 (file)
@@ -1,3 +1,8 @@
+Fri Oct 17 00:04:13 1997  Richard Henderson  <rth@cygnus.com>
+
+       * elflink.h (elf_link_assign_sym_version): For explicitly versioned
+       symbols, check globals list before matching on locals.
+
 Thu Oct 16 08:17:06 1997  Michael Meissner  <meissner@cygnus.com>
 
        * peicode.h (coff_swap_scnhdr_out,pe_print_idata): Fix mangled
index 974d8f06c12cdcaf127391f4db22e95df73a5e7f..bfb5d846e7b0c3aca9832b69b2ddd7a2a05f511c 100644 (file)
@@ -3108,26 +3108,37 @@ elf_link_assign_sym_version (h, data)
        {
          if (strcmp (t->name, p) == 0)
            {
+             int len;
+             char *alc;
+             struct bfd_elf_version_expr *d;
+
+             len = p - h->root.root.string;
+             alc = bfd_alloc (sinfo->output_bfd, len);
+             if (alc == NULL)
+               return false;
+             strncpy (alc, h->root.root.string, len - 1);
+             alc[len - 1] = '\0';
+             if (alc[len - 2] == ELF_VER_CHR)
+               alc[len - 2] = '\0';
+
              h->verinfo.vertree = t;
              t->used = true;
+             d = NULL;
+
+             if (t->globals != NULL)
+               {
+                 for (d = t->globals; d != NULL; d = d->next)
+                   {
+                     if ((d->match[0] == '*' && d->match[1] == '\0')
+                         || fnmatch (d->match, alc, 0) == 0)
+                       break;
+                   }
+               }
 
              /* See if there is anything to force this symbol to
                  local scope.  */
-             if (t->locals != NULL)
+             if (d == NULL && t->locals != NULL)
                {
-                 int len;
-                 char *alc;
-                 struct bfd_elf_version_expr *d;
-
-                 len = p - h->root.root.string;
-                 alc = bfd_alloc (sinfo->output_bfd, len);
-                 if (alc == NULL)
-                   return false;
-                 strncpy (alc, h->root.root.string, len - 1);
-                 alc[len - 1] = '\0';
-                 if (alc[len - 2] == ELF_VER_CHR)
-                   alc[len - 2] = '\0';
-
                  for (d = t->locals; d != NULL; d = d->next)
                    {
                      if ((d->match[0] == '*' && d->match[1] == '\0')
@@ -3150,10 +3161,9 @@ elf_link_assign_sym_version (h, data)
                          break;
                        }
                    }
-
-                 bfd_release (sinfo->output_bfd, alc);
                }
 
+             bfd_release (sinfo->output_bfd, alc);
              break;
            }
        }
This page took 0.043689 seconds and 4 git commands to generate.