This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Symbol versioning question..


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]