Fifth draft of the Y2038 design document
Joseph Myers
joseph@codesourcery.com
Wed Mar 8 20:11:00 GMT 2017
On Wed, 8 Mar 2017, Albert ARIBAUD wrote:
> > > > - 'clock_gettime' redirects to '__clock_gettime'.
> > >
> > > No, it doesn't redirect. User application code is compiled to .o files
> > > that reference clock_gettime, not __clock_gettime. __clock_gettime is a
> > > GLIBC_PRIVATE symbol, only for internal use by glibc libraries when
> > > required for namespace reasons, not for application code. Whereas
> Assume one single source file (say, app.c) which includes <time.h> and
> refers to 'clock_gettime'. This source code is compiled into two object
> modules, one with -DTIME_BITS=64 (sayn app64.o) and one without (say,
> app32.o). Both object modules expect to be linked and run against the
> (same) GLIBC dynamic library. For the app32.o module, we expect its
> call to 'clock_gettime' to end up executing '__clock_gettime' while for
> the app64.o module, we expect its 'clock_gettime' call to end up
> executing '__clock_gettime64'.
As I said above, no user .o file should ever end up referencing
__clock_gettime; that's a purely internal symbol, not a public ABI.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list