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: Create and use first-versions.h with macros for function symbol versions


On Fri, 21 Apr 2017, Florian Weimer wrote:

> On 04/21/2017 11:13 AM, Joseph Myers wrote:
> > This patch arranges for the glibc build to generate a header
> > first-versions.h that defines macros for the earliest symbol version
> > in which each public symbol (GLIBC_[0-9]* symbol version, name only
> > uses C identifier characters) is available.
> 
> Is this the version used in the fourth argument to the compat_symbol macro?

Not necessarily.  It's possible for a function to have three or more 
versions (or two versions, both of which are compat symbols), in which 
case the fourth argument to compat_symbol, when creating the second and 
later compat versions, will not be the same as the version number in this 
header.

It's true that in many cases there will only be one compat version of a 
function, in which case the version from this header is the right one to 
use with compat_symbol, so we could have a common-case compat_symbol 
variant that takes fewer arguments.  Of course, the conditioning 
SHLIB_COMPAT calls also involve a second version that varies per symbol - 
the version in which the previous symbol variant was obsoleted - but in 
the long double cases I'm simplifying, that version is always 
LONG_DOUBLE_COMPAT_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]