]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: Fix missing pthread_ compat symbol in libc
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 17 Jul 2024 00:03:13 +0000 (02:03 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Thu, 1 Aug 2024 21:58:51 +0000 (23:58 +0200)
5476f8cd2e68 ("htl: move pthread_self info libc.") and
9dfa2562162b ("htl: move pthread_equal into libc") to
1dc0bc8f0748 ("htl: move pthread_attr_setdetachstate into libc")
moved some pthread_ symbols from libpthread.so to libc.so, but missed
adding the compat version like 5476f8cd2e68 ("htl: move pthread_self
info libc.") did: libc already had these symbols as forwards,
but versioned GLIBC_2.21, while the symbols in libpthread.so were
versioned GLIBC_2.12.

To fix running executables built before this, we thus have to add the
GLIBC_2.12 version, otherwise execution fails with e.g.

/usr/lib/i386-gnu/libglib-2.0.so: symbol lookup error: /usr/lib/i386-gnu/libglib-2.0.so: undefined symbol: pthread_attr_setinheritsched, version GLIBC_2.12

12 files changed:
htl/Versions
sysdeps/htl/pt-attr-getdetachstate.c
sysdeps/htl/pt-attr-getinheritsched.c
sysdeps/htl/pt-attr-getschedparam.c
sysdeps/htl/pt-attr-getschedpolicy.c
sysdeps/htl/pt-attr-setdetachstate.c
sysdeps/htl/pt-attr-setinheritsched.c
sysdeps/htl/pt-attr-setschedpolicy.c
sysdeps/htl/pt-equal.c
sysdeps/htl/pt-getschedparam.c
sysdeps/htl/pt-setschedparam.c
sysdeps/mach/hurd/i386/libc.abilist

index 69b79b4f1b78491d497142fba9106b1e7eb7b561..949c1867fe9c0fb1280d2e12f12929e37b4f9501 100644 (file)
@@ -3,6 +3,16 @@ libc {
   GLIBC_2.12 {
     pthread_self;
     __pthread_self;
+    pthread_attr_getdetachstate;
+    pthread_attr_getinheritsched;
+    pthread_attr_getschedparam;
+    pthread_attr_getschedpolicy;
+    pthread_attr_setdetachstate;
+    pthread_attr_setinheritsched;
+    pthread_attr_setschedpolicy;
+    pthread_equal;
+    pthread_getschedparam;
+    pthread_setschedparam;
   }
 
   GLIBC_2.21 {
index 8b077e38f3e1ccc873a5a9d6efdb56d51d82b5ed..da27398260252bf3b92a94cef21d02a40b02def8 100644 (file)
@@ -17,6 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <pthread.h>
+#include <shlib-compat.h>
 #include <pt-internal.h>
 
 int
@@ -26,4 +27,8 @@ __pthread_attr_getdetachstate (const pthread_attr_t *attr, int *detachstate)
   return 0;
 }
 
-weak_alias (__pthread_attr_getdetachstate, pthread_attr_getdetachstate);
+versioned_symbol (libc, __pthread_attr_getdetachstate, pthread_attr_getdetachstate, GLIBC_2_21);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_attr_getdetachstate, pthread_attr_getdetachstate, GLIBC_2_12);
+#endif
index 078face3ebd380015c9b518c305ec4297f5aa098..ba02e202c3187d7c59f29ae32626968d44997741 100644 (file)
@@ -17,6 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <pthread.h>
+#include <shlib-compat.h>
 #include <pt-internal.h>
 
 int
@@ -26,4 +27,8 @@ __pthread_attr_getinheritsched (const pthread_attr_t *attr, int *inheritsched)
   return 0;
 }
 
-weak_alias (__pthread_attr_getinheritsched, pthread_attr_getinheritsched);
+versioned_symbol (libc, __pthread_attr_getinheritsched, pthread_attr_getinheritsched, GLIBC_2_21);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_attr_getinheritsched, pthread_attr_getinheritsched, GLIBC_2_12);
+#endif
index 3fa001871ef7624dd30c5a250357c889cde8e569..35eeedc4422cd77b8f84243b22dcccb7c91abde4 100644 (file)
@@ -19,6 +19,7 @@
 #include <pthread.h>
 #include <sched.h>
 #include <string.h>
+#include <shlib-compat.h>
 
 #include <pt-internal.h>
 
@@ -30,4 +31,8 @@ __pthread_attr_getschedparam (const pthread_attr_t *attr,
   return 0;
 }
 
-weak_alias (__pthread_attr_getschedparam, pthread_attr_getschedparam);
+versioned_symbol (libc, __pthread_attr_getschedparam, pthread_attr_getschedparam, GLIBC_2_21);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_attr_getschedparam, pthread_attr_getschedparam, GLIBC_2_12);
+#endif
index 8b4cc7ce481fc6b8f704bb26c97d67b1d6af2e1e..5deaf01c5ed463fa545fd09970b7cbb9b37438c1 100644 (file)
@@ -17,6 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <pthread.h>
+#include <shlib-compat.h>
 #include <pt-internal.h>
 
 int
@@ -26,4 +27,8 @@ __pthread_attr_getschedpolicy (const pthread_attr_t *attr, int *policy)
   return 0;
 }
 
-weak_alias (__pthread_attr_getschedpolicy, pthread_attr_getschedpolicy);
+versioned_symbol (libc, __pthread_attr_getschedpolicy, pthread_attr_getschedpolicy, GLIBC_2_21);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_attr_getschedpolicy, pthread_attr_getschedpolicy, GLIBC_2_12);
+#endif
index b40557f816dc29bc2a5be8b18e8a164256633371..26b6f91dc6cb920a1da3cd6ea30245dca1180cbb 100644 (file)
@@ -17,6 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <pthread.h>
+#include <shlib-compat.h>
 #include <pt-internal.h>
 
 int
@@ -35,4 +36,8 @@ __pthread_attr_setdetachstate (pthread_attr_t *attr, int detachstate)
   return 0;
 }
 
-weak_alias (__pthread_attr_setdetachstate, pthread_attr_setdetachstate);
+versioned_symbol (libc, __pthread_attr_setdetachstate, pthread_attr_setdetachstate, GLIBC_2_21);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_attr_setdetachstate, pthread_attr_setdetachstate, GLIBC_2_12);
+#endif
index 533b805b125e70deb0a89ae2da70fa333806209f..4ad0bb1dec7b24ffd3c7587afdd70107efa735ad 100644 (file)
@@ -17,6 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <pthread.h>
+#include <shlib-compat.h>
 #include <pt-internal.h>
 
 int
@@ -35,4 +36,8 @@ __pthread_attr_setinheritsched (pthread_attr_t *attr, int inheritsched)
   return 0;
 }
 
-weak_alias (__pthread_attr_setinheritsched, pthread_attr_setinheritsched);
+versioned_symbol (libc, __pthread_attr_setinheritsched, pthread_attr_setinheritsched, GLIBC_2_21);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_attr_setinheritsched, pthread_attr_setinheritsched, GLIBC_2_12);
+#endif
index d8086e83164d0018af8caaf70de69aae06a5c1da..9648c774d075a59f76a290d8649b2bc774c0123d 100644 (file)
@@ -17,6 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <pthread.h>
+#include <shlib-compat.h>
 #include <pt-internal.h>
 
 int
@@ -39,4 +40,8 @@ __pthread_attr_setschedpolicy (pthread_attr_t *attr, int policy)
   return 0;
 }
 
-weak_alias (__pthread_attr_setschedpolicy, pthread_attr_setschedpolicy);
+versioned_symbol (libc, __pthread_attr_setschedpolicy, pthread_attr_setschedpolicy, GLIBC_2_21);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_attr_setschedpolicy, pthread_attr_setschedpolicy, GLIBC_2_12);
+#endif
index 64111106085356764793c681c6b7cc2871c7d6f9..7727cca37099eef8b020806f58f2c09c873954f8 100644 (file)
@@ -17,6 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <pthread.h>
+#include <shlib-compat.h>
 #include <pt-internal.h>
 
 /* Return true if __T1 and __T2 both name the same thread.  Otherwise,
@@ -27,4 +28,8 @@ __pthread_equal (pthread_t __t1, pthread_t __t2)
   return __t1 == __t2;
 }
 
-weak_alias (__pthread_equal, pthread_equal);
+versioned_symbol (libc, __pthread_equal, pthread_equal, GLIBC_2_21);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_equal, pthread_equal, GLIBC_2_12);
+#endif
index 8ec3d54bd40156f33232ebd70603618a89284ca1..0c6a2d0ab38695b1fe0c1cea1b3b9b02b4a41af2 100644 (file)
@@ -17,6 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <pthread.h>
+#include <shlib-compat.h>
 #include <pt-internal.h>
 
 int
@@ -28,4 +29,8 @@ __pthread_getschedparam (pthread_t thread, int *policy,
   return 0;
 }
 
-weak_alias (__pthread_getschedparam, pthread_getschedparam);
+versioned_symbol (libc, __pthread_getschedparam, pthread_getschedparam, GLIBC_2_21);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_getschedparam, pthread_getschedparam, GLIBC_2_12);
+#endif
index aea4e7b0e46b3578af1f437335786596b61402b6..5594c9f390d8678be36274cee3dab3699d3173a7 100644 (file)
@@ -17,6 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <pthread.h>
+#include <shlib-compat.h>
 #include <pt-internal.h>
 
 int
@@ -26,5 +27,9 @@ __pthread_setschedparam (pthread_t thread, int policy,
   return ENOSYS;
 }
 
-weak_alias (__pthread_setschedparam, pthread_setschedparam);
+versioned_symbol (libc, __pthread_setschedparam, pthread_setschedparam, GLIBC_2_21);
 stub_warning (pthread_setschedparam)
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_setschedparam, pthread_setschedparam, GLIBC_2_12);
+#endif
index 2adf98e71d4eb9ca54ed0adfa2c89552de9667f5..dc2c6b505b739718ccda3de9b88caa60f8545bb9 100644 (file)
@@ -29,7 +29,17 @@ GLIBC_2.11 mkostemps64 F
 GLIBC_2.11 mkstemps F
 GLIBC_2.11 mkstemps64 F
 GLIBC_2.12 __pthread_self F
+GLIBC_2.12 pthread_attr_getdetachstate F
+GLIBC_2.12 pthread_attr_getinheritsched F
+GLIBC_2.12 pthread_attr_getschedparam F
+GLIBC_2.12 pthread_attr_getschedpolicy F
+GLIBC_2.12 pthread_attr_setdetachstate F
+GLIBC_2.12 pthread_attr_setinheritsched F
+GLIBC_2.12 pthread_attr_setschedpolicy F
+GLIBC_2.12 pthread_equal F
+GLIBC_2.12 pthread_getschedparam F
 GLIBC_2.12 pthread_self F
+GLIBC_2.12 pthread_setschedparam F
 GLIBC_2.13 __fentry__ F
 GLIBC_2.14 syncfs F
 GLIBC_2.15 __fdelt_chk F