This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: pr10515 version script wildcards
On Wed, Aug 26, 2009 at 05:11:33AM +0200, Hans-Peter Nilsson wrote:
> Right, the version script is "TST1 { global: export_*; local: *; };"
> so it seems this was intentional. Nevertheless, always warning
> does not seem preferable; rather, a final catch-all "local: *;"
> somewhat like this seems the way to default symbols unless I
> miss something. Can we at least have an option to silence that
> particular warning?
Blah, I'm removing the warning entirely.
PR ld/10515
* linker.c (bfd_find_version_for_sym): Revert warning.
Index: bfd/linker.c
===================================================================
RCS file: /cvs/src/src/bfd/linker.c,v
retrieving revision 1.71
diff -u -p -r1.71 linker.c
--- bfd/linker.c 26 Aug 2009 01:21:56 -0000 1.71
+++ bfd/linker.c 26 Aug 2009 04:30:14 -0000
@@ -3277,7 +3277,6 @@ bfd_find_version_for_sym (struct bfd_elf
struct bfd_elf_version_tree *t;
struct bfd_elf_version_tree *local_ver, *global_ver, *exist_ver;
struct bfd_elf_version_tree *star_local_ver, *star_global_ver;
- unsigned int match_count = 0;
local_ver = NULL;
global_ver = NULL;
@@ -3292,7 +3291,6 @@ bfd_find_version_for_sym (struct bfd_elf
while ((d = (*t->match) (&t->globals, d, sym_name)) != NULL)
{
- ++match_count;
if (d->literal || strcmp (d->pattern, "*") != 0)
global_ver = t;
else
@@ -3303,10 +3301,7 @@ bfd_find_version_for_sym (struct bfd_elf
/* If the match is a wildcard pattern, keep looking for
a more explicit, perhaps even local, match. */
if (d->literal)
- {
- match_count = 0;
- break;
- }
+ break;
}
if (d != NULL)
@@ -3319,7 +3314,6 @@ bfd_find_version_for_sym (struct bfd_elf
while ((d = (*t->match) (&t->locals, d, sym_name)) != NULL)
{
- ++match_count;
if (d->literal || strcmp (d->pattern, "*") != 0)
local_ver = t;
else
@@ -3331,7 +3325,6 @@ bfd_find_version_for_sym (struct bfd_elf
/* An exact match overrides a global wildcard. */
global_ver = NULL;
star_global_ver = NULL;
- match_count = 0;
break;
}
}
@@ -3341,11 +3334,6 @@ bfd_find_version_for_sym (struct bfd_elf
}
}
- if (match_count > 1)
- (*_bfd_error_handler)
- (_("warning: multiple wildcard version script matches for %s\n"),
- sym_name);
-
if (global_ver == NULL && local_ver == NULL)
global_ver = star_global_ver;
--
Alan Modra
Australia Development Lab, IBM