diff options
author | Xi Ruoyao <xry111@xry111.site> | 2025-08-29 11:39:35 +0800 |
---|---|---|
committer | caiyinyu <caiyinyu@loongson.cn> | 2025-09-01 09:07:35 +0800 |
commit | 4a32b39bb1e4f42ec675aba9dbd39288eb9323b0 (patch) | |
tree | 67af0384ce4227a5a80b825f05ccb0c4b2f66cdf /sysdeps | |
parent | 6dbaed693a2497e06292ad12b0c7dfea10e087b3 (diff) | |
download | glibc-4a32b39bb1e4f42ec675aba9dbd39288eb9323b0.zip glibc-4a32b39bb1e4f42ec675aba9dbd39288eb9323b0.tar.gz glibc-4a32b39bb1e4f42ec675aba9dbd39288eb9323b0.tar.bz2 |
nptl: Drop IS_IN (libpthread) around hidden_proto (__pthread_rwlock_unlock)
Now libpthread is a dummy library and it no longer contains
__pthread_rwlock_unlock at all, thus IS_IN (libpthread) does not make
sense here.
It seems an left over from commit eb29dcde31e7 ("nptl: Move rwlock
functions with forwarders into libc") and it caused libc.so to export an
unversioned __pthread_rwlock_unlock on Linux ports introduced after the
2.34 release (loongarch and or1k) but the symbol is not ever supposed to
be exported on those new ports. Only since the commit 3b2b88cceeb7
("elf: early conversion of elf p_flags to mprotect flags") the header
dependency change happened to pull in libc-lockP.h which sets
hidden_proto (__pthread_rwlock_unlock) correctly, the symbol is no
longer exported, breaking the ABI on those ports.
Remove this #if as a clean up and to prevent such a mess from happening
again.
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/nptl/pthreadP.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sysdeps/nptl/pthreadP.h b/sysdeps/nptl/pthreadP.h index 8f25696..3c9a14c 100644 --- a/sysdeps/nptl/pthreadP.h +++ b/sysdeps/nptl/pthreadP.h @@ -405,6 +405,7 @@ extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock); libc_hidden_proto (__pthread_rwlock_wrlock) extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); +libc_hidden_proto (__pthread_rwlock_unlock) extern int __pthread_cond_broadcast (pthread_cond_t *cond); libc_hidden_proto (__pthread_cond_broadcast) extern int __pthread_cond_destroy (pthread_cond_t *cond); @@ -526,11 +527,6 @@ extern int __pthread_clockjoin_ex (pthread_t, void **, clockid_t, extern int __pthread_sigmask (int, const sigset_t *, sigset_t *); libc_hidden_proto (__pthread_sigmask); - -#if IS_IN (libpthread) -hidden_proto (__pthread_rwlock_unlock) -#endif - extern int __pthread_cond_broadcast_2_0 (pthread_cond_2_0_t *cond); extern int __pthread_cond_destroy_2_0 (pthread_cond_2_0_t *cond); extern int __pthread_cond_init_2_0 (pthread_cond_2_0_t *cond, |