This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] bfd/ld: handle ABI prefixes in version scripts
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: binutils at sourceware dot org, toolchain-devel at blackfin dot uclinux dot org
- Date: Thu, 9 Dec 2010 21:42:59 +0000 (UTC)
- Subject: Re: [PATCH] bfd/ld: handle ABI prefixes in version scripts
- References: <201007061601.24599.vapier@gentoo.org> <1291928188-30119-1-git-send-email-vapier@gentoo.org>
On Thu, 9 Dec 2010, Mike Frysinger wrote:
> The default language in version scripts is supposed to be C, but no
> symbol demangling is performed on the symbols by default. This makes
> targets with a symbol prefix to fail with most version scripts out
> there. So strip away this prefix by default.
>
> This fixes many tests (real world and ld's testsuite) for Blackfin
> targets and doesn't seem to cause regressions for x86_64.
Blackfin has its own libgcc version script in GCC that duplicates the
standard script precisely because of the leading underscores. (The script
also has two Blackfin-specific symbols, and is missing symbols added for
GCC 4.6. The latter illustrates the problem with having this script.)
So it would seem you need to coordinate this change in some way with GCC,
if I understand it correctly - possibly making GCC 4.6 for Blackfin
require a new linker and replacing the duplicate version script with one
just defining the two Blackfin-specific symbols. That doesn't solve the
problem with old GCC and new linkers, though you could add a configure
test to 4.3/4.4/4.5 release branches to reject new linkers for Blackfin.
--
Joseph S. Myers
joseph@codesourcery.com