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: Multiple symbol versions for the same function


On Sat, 23 Jun 2018, Florian Weimer wrote:

> Is there a way to implement what I want that works with binutils 2.25? I'm not
> sure if we want to build glibc with --allow-multiple-definition.

See, for example, the various <fenv.h> functions, which have multiple 
versions pointing to the same implementation because C99 TC1 changed 
return types from void to int (so callers expecting void can safely call 
an implementation returning int, but callers expecting int can't safely 
run with an older implementation version returning void).

I think the difference from your example is that three names for the 
function are involved, not two; each .symver directive ends up being of 
the form ".symver func_alias, func@VERSION" (or @@VERSION), where there 
are two different aliases, neither of which is the same as the symbol 
being assigned a version.

-- 
Joseph S. Myers
joseph@codesourcery.com


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