[PATCH 1/2] nptl: Drop IS_IN (libpthread) around hidden_proto (__pthread_rwlock_unlock)

Florian Weimer fweimer@redhat.com
Fri Aug 29 06:51:03 GMT 2025


* Xi Ruoyao:

> 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>

Okay.  Thanks for getting to the root of this.

Reviewed-by: Florian Weimer <fweimer@redhat.com>

Florian



More information about the Libc-alpha mailing list