This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Are the pthread "compatibility" copies of symbols in libc still necessary?
- From: Zack Weinberg <zackw at panix dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 16 Mar 2018 10:30:44 -0400
- Subject: Are the pthread "compatibility" copies of symbols in libc still necessary?
A number of source files that properly belong to libc.so are also
compiled as part of libpthread, with a note that this is for
"compatibility for old binaries". The exact set varies based on
architecture, but includes basic things like read, write, and fork - I
_think_ there was a difference in semantics in the distant past,
having something to do with thread cancellation.
It seems to me that these are no longer necessary. The overall
behavior we want is for new binaries to link against the symbols in
libc.so, and old binaries that were linked against a libpthread with
those symbols to continue to work. ELF doesn't require undefined
references to resolve to specific libraries at load time, so if we
just dropped the symbols from libpthread, shouldn't the references
from old binaries automatically resolve to the definitions in libc,
which is what we want? Am I missing something?
zw