- struct bfd_elf_version_tree *t;
- struct bfd_elf_version_tree *local_ver, *global_ver, *exist_ver;
- struct bfd_elf_version_expr *d;
-
- /* See if can find what version this symbol is in. If the
- symbol is supposed to be local, then don't actually register
- it. */
- local_ver = NULL;
- global_ver = NULL;
- exist_ver = NULL;
- for (t = sinfo->verdefs; t != NULL; t = t->next)
- {
- if (t->globals.list != NULL)
- {
- d = NULL;
- while ((d = (*t->match) (&t->globals, d,
- h->root.root.string)) != NULL)
- {
- global_ver = t;
- local_ver = NULL;
- if (d->symver)
- exist_ver = t;
- d->script = 1;
- /* If the match is a wildcard pattern, keep looking for
- a more explicit, perhaps even local, match. */
- if (d->literal)
- break;
- }
-
- if (d != NULL)
- break;
- }
-
- if (t->locals.list != NULL)
- {
- d = NULL;
- while ((d = (*t->match) (&t->locals, d,
- h->root.root.string)) != NULL)
- {
- local_ver = t;
- /* If the match is a wildcard pattern, keep looking for
- a more explicit, perhaps even global, match. */
- if (d->literal)
- {
- /* An exact match overrides a global wildcard. */
- global_ver = NULL;
- break;
- }
- }