This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Symbol versioning question..
- From: Richard Henderson <rth at twiddle dot net>
- To: Marcus Shawcroft <marcus dot shawcroft at linaro dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 24 Jul 2013 07:35:10 -1000
- Subject: Re: Symbol versioning question..
- References: <CABXK9ndVsUhXdx5YfV+NDSa99daV9wJtj1ucMAxcH6zQmbChqg at mail dot gmail dot com> <51E96F11 dot 9030300 at twiddle dot net> <CABXK9ndEFLG1Ac9CFwqd3rYg-15oZTLa7He-jLFOT_YrHu993A at mail dot gmail dot com>
On 07/24/2013 06:56 AM, Marcus Shawcroft wrote:
> 2) Versioning two symbols from the same base:
> versioned_symbol (libc, __mcount, _mcount, GLIBC_2_18);
> versioned_symbol (libc, __mcount, mcount, GLIBC_2_18);
>
> results in:
>
> mcount.s:10: Error: multiple versions
> [`mcount@@GLIBC_2.18'|`_mcount@@GLIBC_2.18'] for symbol `__mcount'
>
> Suggestions welcome.
>
Honestly, this is an assembler bug, but we've been working around
it for years. Here you have to jump though silly hoops, and create
an alternate base symbol via an alias. E.g.
weak_alias (__mcount, __mcount1)
versioned_symbol (libc, __mcount, _mcount, GLIBC_2_18)
versioned_symbol (libc, __mcount1, mcount, GLIBC_2_18)
There are other examples in the source base for similar if you go
grepping...
r~