Red Hat Bugzilla – Bug 25553
pread function versioned incorrectly
Last modified: 2016-11-24 10:11:59 EST
Compiling the following test program on an RH7 or 7.1beta machine results
in a program that does not run on a 6.2 box, even though the pread function
definition has not changed.
gcc -Wall -lpthread -lrt -o pread_test pread_test.c
pread(0, buf, 0, 0);
It has changed, because in glibc 2.1.3 and below it had no linuxthreads
wrapper. And no matter what, symbol versioning is about upward binary
compatibility so older binaries work with newer libc, not vice versa.
pread and family could not be put into GLIBC_2.1.3 because 2.1.3 was released,
and e.g. rpm would be severely confused if we started adding symbols @GLIBC_2.1