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: [PATCH 08/12] Use clock_gettime to implement gettimeofday.


On Tue, 20 Aug 2019, Zack Weinberg wrote:

> __gettimeofday is no longer called by anyone, so remove its internal
> prototype and its entries in Versions and .abilist files.  (It would
> have been a GLIBC_PRIVATE symbol if the GLIBC_PRIVATE convention had
> been invented back in the days of 2.0.)

That's not obviously safe.  The choice of which internal symbols to move 
to GLIBC_PRIVATE when GLIBC_PRIVATE was introduced

2002-02-01  Jakub Jelinek  <jakub@redhat.com>

        * Versions.def (libc): Add GLIBC_PRIVATE.
        [...]

was clearly a deliberate choice (as was the choice of which symbols in 
glibc 2.0 not to export at a public symbol version when symbol versioning 
was introduced in 2.1).  __gettimeofday is certainly the kind of symbol 
that could have been used by a library with its own namespace concerns 
(cf. past discussions of how we might enable libstdc++ to be 
namespace-clean), although maybe more likely to have been used by an 
application that should be using gettimeofday.

Perhaps someone set up to do so could check large sets of current and past 
distribution binaries for any reference to the __gettimeofday symbol in 
executable / shared library dynamic symbol tables, as evidence for whether 
such an ABI change is safe or not?

-- 
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]