This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: pr10515 version script wildcards
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: amodra at bigpond dot net dot au
- Cc: binutils at sourceware dot org
- Date: Wed, 26 Aug 2009 05:11:33 +0200
- Subject: Re: pr10515 version script wildcards
> Date: Wed, 26 Aug 2009 10:51:18 +0930
> From: Alan Modra <amodra@bigpond.net.au>
> This restores the old ld behaviour of treating "*" in a version script
> as a lower priority match than other wildcard patterns. I think that
> using scripts with multiple wildcard patterns is a dubious practice,
> but the ld docs do say that "*" ought to be treated like this.
>
> PR ld/10515
> * linker.c (bfd_find_version_for_sym): Override a "*" match by any
> other wildcard match. Warn on multiple wildcard matches.
This caused a regression in my autotester for cris-elf and cris-linux:
Executing on host: sh -c {./ld-new -L/tmp/hpautotest-binutils/bsrc/src/ld/testsuite/ld-cris --shared -m crislinux --version-script /tmp/hpautotest-binutils/bsrc/src/ld/testsuite/ld-cris/hide1 -o tmpdir/dump tmpdir/dump0.o tmpdir/dump1.o 2>&1} /dev/null ld.tmp (timeout = 300)
./ld-new: warning: multiple wildcard version script matches for export_1
succeeded with: <./ld-new: warning: multiple wildcard version script matches for export_1
>, expected: <>
./ld-new: warning: multiple wildcard version script matches for export_1
succeeded with: <./ld-new: warning: multiple wildcard version script matches for export_1
>, expected: <>
FAIL: ld-cris/libdso-2
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?
brgds, H-P