[RFC 2/6] y2038: stat: {f}stat{at}64_time64 redirection to be used on Y2038 systems
Joseph Myers
joseph@codesourcery.com
Mon Dec 7 18:07:06 GMT 2020
On Mon, 7 Dec 2020, Lukasz Majewski wrote:
> Is my understanding correct that GLIBC_PRIVATE symbols are only for
> cross libraries reference? For example such symbol from glibc could be
> referenced in librt?
GLIBC_PRIVATE symbols are only for reference by libraries or programs
installed by glibc. So, yes, a symbol provided by libc.so for use from
librt.so could be GLIBC_PRIVATE, if it's not intended for users to link
their own code against and is not referenced in any installed header or
*_nonshared.a library or crt*.o. Sometimes such symbols may be used in
the programs glibc installs (in usr/bin, usr/sbin, etc.; e.g. nscd), not
just libraries, though it's less clear if that's a good idea.
GLIBC_PRIVATE symbols do not need to have any kind of a stable ABI,
because the definition and user of the symbol always come from the same
set of glibc sources. However, ABI changes to such symbols can be
dangerous on release branches, because of the situation where (a) a
process starts up and loads libc, (b) an updated distribution package of
glibc libraries is installed, (c) that process dlopens a glibc shared
library it didn't load at startup, and that library (from the updated
package) wants a GLIBC_PRIVATE symbol that's not present with the right
ABI in the (older) libc it loaded at startup.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list