This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fifth draft of the Y2038 design document
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Albert ARIBAUD <albert dot aribaud at 3adev dot fr>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 8 Mar 2017 20:11:24 +0000
- Subject: Re: Fifth draft of the Y2038 design document
- Authentication-results: sourceware.org; auth=none
- References: <20170222090511.48be22ed.albert.aribaud@3adev.fr> <alpine.DEB.2.20.1702221647560.8704@digraph.polyomino.org.uk> <20170222194855.7581deca.albert.aribaud@3adev.fr> <alpine.DEB.2.20.1702222055440.24643@digraph.polyomino.org.uk> <20170223131634.06fa476c.albert.aribaud@3adev.fr> <alpine.DEB.2.20.1702231418320.15395@digraph.polyomino.org.uk> <20170223165052.1b494e3a.albert.aribaud@3adev.fr> <20170308132732.11b1edbc.albert.aribaud@3adev.fr>
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