public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/4] GLIBC_PRIVATE ABI cleanups
@ 2021-07-06 17:22 Florian Weimer
  2021-07-06 17:22 ` [PATCH 1/4] nptl: Use internal low-level lock type for !IS_IN (libc) Florian Weimer
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Florian Weimer @ 2021-07-06 17:22 UTC (permalink / raw)
  To: libc-alpha

This is a follow-up due to the libc integration work.

I think using the libc locks is the right thing to do for now.  In the
future, we might migrate nss_db and nss_hesiod to plain
pthread_mutex_lock (no __ prefix) and use pthread_mutex_t in them.  For
nss_files/nss_dns and without libc integration for them, there might be
a minimal conformance issue here because there is (I think) a POSIX
version which specifies NSS functions but not libpthread.

__pthread_mutex_lock, __pthread_mutex_unlock are currently used by rr; I
filed at ticket explaining why I think they don't need to that for glibc
2.34 anymore:

  glibc 2.34 enablement around pthread mutex handling
  <https://github.com/rr-debugger/rr/issues/2913>

We kept the GLIBC_2.34 symbol versions for those initially because we
could not migrate all internal uses off a
__pthread_mutex_lock@@GLIBC_PRIVATE symbol, and the external users would
have bound to a GLIBC_PRIVATE symbol, so GLIBC_2.34 seemed the better
choice.

Tested on i686-linux-gnu and x86_64-linux-gnu.  Built with
build-many-glibcs.py.

Thanks,
Florian

Florian Weimer (4):
  nptl: Use internal low-level lock type for !IS_IN (libc)
  nptl: Remove GLIBC_2.34 versions of __pthread_mutex_lock,
    __pthread_mutex_unlock
  nptl: Reduce the GLIBC_PRIVATE ABI
  elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols

 dlfcn/dlerror.c                               |   1 -
 elf/Makefile                                  |  16 +--
 elf/Versions                                  |   3 -
 elf/dl-addr.c                                 |   1 -
 elf/dl-libc.c                                 |   4 -
 elf/dl-sym.c                                  |   2 -
 elf/tst-libc_dlvsym-dso.c                     |  25 ----
 elf/tst-libc_dlvsym-static.c                  |  32 -----
 elf/tst-libc_dlvsym.c                         |  34 -----
 elf/tst-libc_dlvsym.h                         | 130 ------------------
 include/dlfcn.h                               |  30 ++--
 nptl/Versions                                 |  44 ------
 nptl/pthread_barrier_init.c                   |   5 +-
 nptl/pthread_barrier_wait.c                   |   5 +-
 nptl/pthread_cond_wait.c                      |   5 +-
 nptl/pthread_mutex_lock.c                     |   5 +-
 nptl/pthread_mutex_timedlock.c                |   5 +-
 nptl/pthread_mutex_unlock.c                   |   5 +-
 nptl/pthread_testcancel.c                     |   5 +-
 sysdeps/nptl/libc-lockP.h                     |  51 +------
 sysdeps/unix/sysv/linux/aarch64/libc.abilist  |   2 -
 sysdeps/unix/sysv/linux/alpha/libc.abilist    |   2 -
 sysdeps/unix/sysv/linux/arc/libc.abilist      |   2 -
 sysdeps/unix/sysv/linux/arm/be/libc.abilist   |   2 -
 sysdeps/unix/sysv/linux/arm/le/libc.abilist   |   2 -
 sysdeps/unix/sysv/linux/csky/libc.abilist     |   2 -
 sysdeps/unix/sysv/linux/hppa/libc.abilist     |   2 -
 sysdeps/unix/sysv/linux/i386/libc.abilist     |   2 -
 sysdeps/unix/sysv/linux/ia64/libc.abilist     |   2 -
 .../sysv/linux/m68k/coldfire/libc.abilist     |   2 -
 .../unix/sysv/linux/m68k/m680x0/libc.abilist  |   2 -
 .../sysv/linux/microblaze/be/libc.abilist     |   2 -
 .../sysv/linux/microblaze/le/libc.abilist     |   2 -
 .../sysv/linux/mips/mips32/fpu/libc.abilist   |   2 -
 .../sysv/linux/mips/mips32/nofpu/libc.abilist |   2 -
 .../sysv/linux/mips/mips64/n32/libc.abilist   |   2 -
 .../sysv/linux/mips/mips64/n64/libc.abilist   |   2 -
 sysdeps/unix/sysv/linux/nios2/libc.abilist    |   2 -
 .../linux/powerpc/powerpc32/fpu/libc.abilist  |   2 -
 .../powerpc/powerpc32/nofpu/libc.abilist      |   2 -
 .../linux/powerpc/powerpc64/be/libc.abilist   |   2 -
 .../linux/powerpc/powerpc64/le/libc.abilist   |   2 -
 .../unix/sysv/linux/riscv/rv32/libc.abilist   |   2 -
 .../unix/sysv/linux/riscv/rv64/libc.abilist   |   2 -
 .../unix/sysv/linux/s390/s390-32/libc.abilist |   2 -
 .../unix/sysv/linux/s390/s390-64/libc.abilist |   2 -
 sysdeps/unix/sysv/linux/sh/be/libc.abilist    |   2 -
 sysdeps/unix/sysv/linux/sh/le/libc.abilist    |   2 -
 .../sysv/linux/sparc/sparc32/libc.abilist     |   2 -
 .../sysv/linux/sparc/sparc64/libc.abilist     |   2 -
 .../unix/sysv/linux/x86_64/64/libc.abilist    |   2 -
 .../unix/sysv/linux/x86_64/x32/libc.abilist   |   2 -
 52 files changed, 44 insertions(+), 428 deletions(-)
 delete mode 100644 elf/tst-libc_dlvsym-dso.c
 delete mode 100644 elf/tst-libc_dlvsym-static.c
 delete mode 100644 elf/tst-libc_dlvsym.c
 delete mode 100644 elf/tst-libc_dlvsym.h

-- 
2.31.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 1/4] nptl: Use internal low-level lock type for !IS_IN (libc)
  2021-07-06 17:22 [PATCH 0/4] GLIBC_PRIVATE ABI cleanups Florian Weimer
@ 2021-07-06 17:22 ` Florian Weimer
  2021-07-06 19:24   ` Adhemerval Zanella
  2021-07-06 17:22 ` [PATCH 2/4] nptl: Remove GLIBC_2.34 versions of __pthread_mutex_lock, __pthread_mutex_unlock Florian Weimer
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: Florian Weimer @ 2021-07-06 17:22 UTC (permalink / raw)
  To: libc-alpha

This avoids an ABI hazard (types changing between different modules
of glibc) without introducing linknamespace issues. In particular,
NSS modules now call __lll_lock_wait_private@@GLIBC_PRIVATE to wait
on internal locks (the unlock path is inlined and performs a direct
system call).
---
 sysdeps/nptl/libc-lockP.h | 51 ++++-----------------------------------
 1 file changed, 5 insertions(+), 46 deletions(-)

diff --git a/sysdeps/nptl/libc-lockP.h b/sysdeps/nptl/libc-lockP.h
index ef88a3e533..b66c938e44 100644
--- a/sysdeps/nptl/libc-lockP.h
+++ b/sysdeps/nptl/libc-lockP.h
@@ -33,18 +33,8 @@
 #include <lowlevellock.h>
 #include <tls.h>
 
-#if IS_IN (libpthread)
-/* This gets us the declarations of the __pthread_* internal names,
-   and hidden_proto for them.  */
-# include <pthreadP.h>
-#endif
-
 /* Mutex type.  */
-#if !IS_IN (libc) && !IS_IN (libpthread)
-typedef pthread_mutex_t __libc_lock_t;
-#else
 typedef int __libc_lock_t;
-#endif
 typedef struct { pthread_mutex_t mutex; } __rtld_lock_recursive_t;
 typedef pthread_rwlock_t __libc_rwlock_t;
 
@@ -108,56 +98,25 @@ _Static_assert (LLL_LOCK_INITIALIZER == 0, "LLL_LOCK_INITIALIZER != 0");
 
 /* Initialize the named lock variable, leaving it in a consistent, unlocked
    state.  */
-#if IS_IN (libc) || IS_IN (libpthread)
-# define __libc_lock_init(NAME) \
-  ((void) ((NAME) = LLL_LOCK_INITIALIZER))
-#else
-# define __libc_lock_init(NAME) __pthread_mutex_init (&(NAME))
-#endif
+#define __libc_lock_init(NAME) ((void) ((NAME) = LLL_LOCK_INITIALIZER))
 #define __libc_rwlock_init(NAME) __pthread_rwlock_init (&(NAME), NULL)
 
 /* Finalize the named lock variable, which must be locked.  It cannot be
    used again until __libc_lock_init is called again on it.  This must be
    called on a lock variable before the containing storage is reused.  */
-#if IS_IN (libc) || IS_IN (libpthread)
-# define __libc_lock_fini(NAME) ((void) 0)
-#else
-# define __libc_lock_fini(NAME) __pthread_mutex_destroy (&(NAME))
-#endif
+#define __libc_lock_fini(NAME) ((void) 0)
 #define __libc_rwlock_fini(NAME) ((void) 0)
 
 /* Lock the named lock variable.  */
-#if IS_IN (libc) || IS_IN (libpthread)
-# ifndef __libc_lock_lock
-#  define __libc_lock_lock(NAME) \
-  ({ lll_lock (NAME, LLL_PRIVATE); 0; })
-# endif
-#else
-# undef __libc_lock_lock
-# define __libc_lock_lock(NAME) __pthread_mutex_lock (&(NAME))
-#endif
+#define __libc_lock_lock(NAME) ({ lll_lock (NAME, LLL_PRIVATE); 0; })
 #define __libc_rwlock_rdlock(NAME) __pthread_rwlock_rdlock (&(NAME))
 #define __libc_rwlock_wrlock(NAME) __pthread_rwlock_wrlock (&(NAME))
 
 /* Try to lock the named lock variable.  */
-#if IS_IN (libc) || IS_IN (libpthread)
-# ifndef __libc_lock_trylock
-#  define __libc_lock_trylock(NAME) \
-  lll_trylock (NAME)
-# endif
-#else
-# undef __libc_lock_trylock
-# define __libc_lock_trylock(NAME) \
-  __libc_maybe_call (__pthread_mutex_trylock, (&(NAME)), 0)
-#endif
+#define __libc_lock_trylock(NAME) lll_trylock (NAME)
 
 /* Unlock the named lock variable.  */
-#if IS_IN (libc) || IS_IN (libpthread)
-# define __libc_lock_unlock(NAME) \
-  lll_unlock (NAME, LLL_PRIVATE)
-#else
-# define __libc_lock_unlock(NAME) __pthread_mutex_unlock (&(NAME))
-#endif
+#define __libc_lock_unlock(NAME) lll_unlock (NAME, LLL_PRIVATE)
 #define __libc_rwlock_unlock(NAME) __pthread_rwlock_unlock (&(NAME))
 
 #if IS_IN (rtld)
-- 
2.31.1



^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 2/4] nptl: Remove GLIBC_2.34 versions of __pthread_mutex_lock,  __pthread_mutex_unlock
  2021-07-06 17:22 [PATCH 0/4] GLIBC_PRIVATE ABI cleanups Florian Weimer
  2021-07-06 17:22 ` [PATCH 1/4] nptl: Use internal low-level lock type for !IS_IN (libc) Florian Weimer
@ 2021-07-06 17:22 ` Florian Weimer
  2021-07-06 19:25   ` Adhemerval Zanella
  2021-07-06 17:22 ` [PATCH 3/4] nptl: Reduce the GLIBC_PRIVATE ABI Florian Weimer
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: Florian Weimer @ 2021-07-06 17:22 UTC (permalink / raw)
  To: libc-alpha

Now that there are no internal users anymore, these new symbol
versions can be removed from the public ABI.  The compatibility
symbols remain.
---
 nptl/Versions                                                | 2 --
 nptl/pthread_mutex_lock.c                                    | 5 +++--
 nptl/pthread_mutex_unlock.c                                  | 5 +++--
 sysdeps/unix/sysv/linux/aarch64/libc.abilist                 | 2 --
 sysdeps/unix/sysv/linux/alpha/libc.abilist                   | 2 --
 sysdeps/unix/sysv/linux/arc/libc.abilist                     | 2 --
 sysdeps/unix/sysv/linux/arm/be/libc.abilist                  | 2 --
 sysdeps/unix/sysv/linux/arm/le/libc.abilist                  | 2 --
 sysdeps/unix/sysv/linux/csky/libc.abilist                    | 2 --
 sysdeps/unix/sysv/linux/hppa/libc.abilist                    | 2 --
 sysdeps/unix/sysv/linux/i386/libc.abilist                    | 2 --
 sysdeps/unix/sysv/linux/ia64/libc.abilist                    | 2 --
 sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist           | 2 --
 sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist             | 2 --
 sysdeps/unix/sysv/linux/microblaze/be/libc.abilist           | 2 --
 sysdeps/unix/sysv/linux/microblaze/le/libc.abilist           | 2 --
 sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist         | 2 --
 sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist       | 2 --
 sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist         | 2 --
 sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist         | 2 --
 sysdeps/unix/sysv/linux/nios2/libc.abilist                   | 2 --
 sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist   | 2 --
 sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist | 2 --
 sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist    | 2 --
 sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist    | 2 --
 sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist              | 2 --
 sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist              | 2 --
 sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist            | 2 --
 sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist            | 2 --
 sysdeps/unix/sysv/linux/sh/be/libc.abilist                   | 2 --
 sysdeps/unix/sysv/linux/sh/le/libc.abilist                   | 2 --
 sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist           | 2 --
 sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist           | 2 --
 sysdeps/unix/sysv/linux/x86_64/64/libc.abilist               | 2 --
 sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist              | 2 --
 35 files changed, 6 insertions(+), 70 deletions(-)

diff --git a/nptl/Versions b/nptl/Versions
index 060d8d5dec..0a1c75509a 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -253,8 +253,6 @@ libc {
   GLIBC_2.34 {
     __pthread_cleanup_routine;
     __pthread_key_create;
-    __pthread_mutex_lock;
-    __pthread_mutex_unlock;
     __pthread_register_cancel;
     __pthread_register_cancel_defer;
     __pthread_unregister_cancel;
diff --git a/nptl/pthread_mutex_lock.c b/nptl/pthread_mutex_lock.c
index c9e438ef37..da624f322d 100644
--- a/nptl/pthread_mutex_lock.c
+++ b/nptl/pthread_mutex_lock.c
@@ -609,9 +609,10 @@ __pthread_mutex_lock_full (pthread_mutex_t *mutex)
 }
 
 #if PTHREAD_MUTEX_VERSIONS
-versioned_symbol (libpthread, ___pthread_mutex_lock, __pthread_mutex_lock,
-		  GLIBC_2_34);
 libc_hidden_ver (___pthread_mutex_lock, __pthread_mutex_lock)
+# ifndef SHARED
+strong_alias (___pthread_mutex_lock, __pthread_mutex_lock)
+# endif
 versioned_symbol (libpthread, ___pthread_mutex_lock, pthread_mutex_lock,
 		  GLIBC_2_0);
 
diff --git a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c
index ea88ba2986..7c15397572 100644
--- a/nptl/pthread_mutex_unlock.c
+++ b/nptl/pthread_mutex_unlock.c
@@ -368,9 +368,10 @@ ___pthread_mutex_unlock (pthread_mutex_t *mutex)
 {
   return __pthread_mutex_unlock_usercnt (mutex, 1);
 }
-versioned_symbol (libpthread, ___pthread_mutex_unlock, __pthread_mutex_unlock,
-		  GLIBC_2_34);
 libc_hidden_ver (___pthread_mutex_unlock, __pthread_mutex_unlock)
+#ifndef SHARED
+strong_alias (___pthread_mutex_unlock, __pthread_mutex_unlock)
+#endif
 versioned_symbol (libpthread, ___pthread_mutex_unlock, pthread_mutex_unlock,
 		  GLIBC_2_0);
 
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index 6730cbdd6b..6f19b07b47 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -2384,8 +2384,6 @@ GLIBC_2.34 __libc_start_main F
 GLIBC_2.34 __mq_open_2 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index 63de4fadc3..6ece449d4b 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -2483,8 +2483,6 @@ GLIBC_2.34 __libc_start_main F
 GLIBC_2.34 __mq_open_2 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist
index 2f13701fd7..3bf846349f 100644
--- a/sysdeps/unix/sysv/linux/arc/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arc/libc.abilist
@@ -2143,8 +2143,6 @@ GLIBC_2.34 __libc_start_main F
 GLIBC_2.34 __mq_open_2 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index 9b824f1605..08be998d35 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
@@ -245,9 +245,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index 443a81b8f7..ebd767ed96 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -242,9 +242,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index 243de3cf93..4a467e706e 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2377,9 +2377,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index 24ae58bb6f..bdef8d2a34 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2330,9 +2330,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index 09bebcd5a1..eba95a2cf0 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2514,9 +2514,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist
index 0bafe09253..3fbc5ae978 100644
--- a/sysdeps/unix/sysv/linux/ia64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist
@@ -2321,8 +2321,6 @@ GLIBC_2.34 __libc_start_main F
 GLIBC_2.34 __mq_open_2 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index c1fcde4c24..0aef2ec43a 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -246,9 +246,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index 407651cfd7..a4704f7e96 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2457,9 +2457,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index 7da722a734..8f135f30c0 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2428,9 +2428,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
index c374607b81..719609ac10 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2425,9 +2425,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index b1f426e053..f9a6bccdc5 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2422,9 +2422,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index 066ceb2258..cee02495c6 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -2420,9 +2420,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index 51c563ebbe..c9fdfe3a55 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -2428,9 +2428,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
index 28db715d8a..d27c97094e 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
@@ -2372,8 +2372,6 @@ GLIBC_2.34 __libc_start_main F
 GLIBC_2.34 __mq_open_2 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index ab9f2bd42c..25f270403f 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2467,9 +2467,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index 83f8513e17..0256a272dd 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -2484,9 +2484,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index 0fad357bf6..946f855c64 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -2517,9 +2517,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
index 424ec8d953..602da17327 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
@@ -2285,8 +2285,6 @@ GLIBC_2.34 __libc_start_main F
 GLIBC_2.34 __mq_open_2 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
index 9909fd0e9a..287285a21a 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
@@ -2580,8 +2580,6 @@ GLIBC_2.34 __libc_start_main F
 GLIBC_2.34 __mq_open_2 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
index 7085989b16..cdeee28d0f 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
@@ -2145,8 +2145,6 @@ GLIBC_2.34 __libc_start_main F
 GLIBC_2.34 __mq_open_2 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
index a855997957..a74b54d6bb 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
@@ -2345,8 +2345,6 @@ GLIBC_2.34 __libc_start_main F
 GLIBC_2.34 __mq_open_2 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index 12aeb82520..e96371317c 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -2482,9 +2482,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
index e2d746ad5f..aadc7c1d66 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
@@ -2322,8 +2322,6 @@ GLIBC_2.34 __libc_start_main F
 GLIBC_2.34 __mq_open_2 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
index 1ce4b54bf2..cc4a625cb4 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -2337,9 +2337,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index 7d01add713..163d2cd613 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2334,9 +2334,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index b5ef3247d7..6eceee6b88 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -2477,9 +2477,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
 GLIBC_2.34 __pthread_cond_timedwait64 F
 GLIBC_2.34 __pthread_key_create F
 GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
 GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
index 14ae7c8417..e6bac469ba 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
@@ -2344,8 +2344,6 @@ GLIBC_2.34 __libc_start_main F
 GLIBC_2.34 __mq_open_2 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index 57c4f28d17..e90f3e54c0 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -2300,8 +2300,6 @@ GLIBC_2.34 __libc_start_main F
 GLIBC_2.34 __mq_open_2 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
index 47211abe4e..792f681bba 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
@@ -2399,8 +2399,6 @@ GLIBC_2.34 __libc_start_main F
 GLIBC_2.34 __mq_open_2 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
 GLIBC_2.34 __pthread_register_cancel F
 GLIBC_2.34 __pthread_register_cancel_defer F
 GLIBC_2.34 __pthread_unregister_cancel F
-- 
2.31.1



^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 3/4] nptl: Reduce the GLIBC_PRIVATE ABI
  2021-07-06 17:22 [PATCH 0/4] GLIBC_PRIVATE ABI cleanups Florian Weimer
  2021-07-06 17:22 ` [PATCH 1/4] nptl: Use internal low-level lock type for !IS_IN (libc) Florian Weimer
  2021-07-06 17:22 ` [PATCH 2/4] nptl: Remove GLIBC_2.34 versions of __pthread_mutex_lock, __pthread_mutex_unlock Florian Weimer
@ 2021-07-06 17:22 ` Florian Weimer
  2021-07-06 19:26   ` Adhemerval Zanella
  2021-07-06 17:22 ` [PATCH 4/4] elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols Florian Weimer
  2021-07-07 10:56 ` [PATCH 0/4] GLIBC_PRIVATE ABI cleanups Szabolcs Nagy
  4 siblings, 1 reply; 15+ messages in thread
From: Florian Weimer @ 2021-07-06 17:22 UTC (permalink / raw)
  To: libc-alpha

The remaining symbols are mostly used by libthread_db.
__pthread_get_minstack has to remain exported even though unused.
---
 nptl/Versions                  | 42 ----------------------------------
 nptl/pthread_barrier_init.c    |  5 ++--
 nptl/pthread_barrier_wait.c    |  5 ++--
 nptl/pthread_cond_wait.c       |  5 ++--
 nptl/pthread_mutex_timedlock.c |  5 ++--
 nptl/pthread_testcancel.c      |  5 ++--
 6 files changed, 15 insertions(+), 52 deletions(-)

diff --git a/nptl/Versions b/nptl/Versions
index 0a1c75509a..2a75f013f2 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -379,59 +379,17 @@ libc {
     tss_set;
   }
   GLIBC_PRIVATE {
-    __default_pthread_attr;
-    __default_pthread_attr_lock;
-    __futex_abstimed_wait64;
-    __futex_abstimed_wait_cancelable64;
-    __init_sched_fifo_prio;
     __libc_alloca_cutoff;
-    __libc_cleanup_pop_restore;
-    __libc_cleanup_push_defer;
-    __libc_dl_error_tsd;
-    __libc_multiple_threads;
-    __lll_clocklock_elision;
-    __lll_lock_elision;
-    __lll_lock_wait;
     __lll_lock_wait_private;
-    __lll_trylock_elision;
-    __lll_unlock_elision;
-    __mutex_aconf;
     __nptl_create_event;
-    __nptl_deallocate_stack;
-    __nptl_deallocate_tsd;
     __nptl_death_event;
-    __nptl_free_tcb;
     __nptl_last_event;
     __nptl_nthreads;
     __nptl_rtld_global;
-    __nptl_setxid_sighandler;
-    __nptl_stack_list_add;
-    __nptl_stack_list_del;
     __nptl_threads_events;
     __nptl_version;
-    __pthread_attr_copy;
-    __pthread_attr_destroy;
-    __pthread_attr_init;
-    __pthread_attr_setaffinity_np;
-    __pthread_attr_setsigmask_internal;
-    __pthread_barrier_init;
-    __pthread_barrier_wait;
-    __pthread_cleanup_pop;
-    __pthread_cleanup_push;
-    __pthread_cleanup_upto;
-    __pthread_current_priority;
-    __pthread_disable_asynccancel;
-    __pthread_enable_asynccancel;
-    __pthread_force_elision;
     __pthread_get_minstack;
     __pthread_keys;
-    __pthread_mutex_unlock_usercnt;
-    __pthread_setcancelstate;
-    __pthread_testcancel;
-    __pthread_tpp_change_priority;
-    __pthread_unwind;
-    __sched_fifo_max_prio;
-    __sched_fifo_min_prio;
     _thread_db___nptl_last_event;
     _thread_db___nptl_nthreads;
     _thread_db___nptl_rtld_global;
diff --git a/nptl/pthread_barrier_init.c b/nptl/pthread_barrier_init.c
index 3a13d2a756..4aa3b8c0d9 100644
--- a/nptl/pthread_barrier_init.c
+++ b/nptl/pthread_barrier_init.c
@@ -63,9 +63,10 @@ ___pthread_barrier_init (pthread_barrier_t *barrier,
 }
 versioned_symbol (libc, ___pthread_barrier_init, pthread_barrier_init,
                   GLIBC_2_34);
-versioned_symbol (libc, ___pthread_barrier_init, __pthread_barrier_init,
-                  GLIBC_PRIVATE);
 libc_hidden_ver (___pthread_barrier_init, __pthread_barrier_init)
+#ifndef SHARED
+strong_alias (___pthread_barrier_init, __pthread_barrier_init)
+#endif
 
 #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34)
 compat_symbol (libpthread, ___pthread_barrier_init, pthread_barrier_init,
diff --git a/nptl/pthread_barrier_wait.c b/nptl/pthread_barrier_wait.c
index 4f8abe16bb..10b68c1c35 100644
--- a/nptl/pthread_barrier_wait.c
+++ b/nptl/pthread_barrier_wait.c
@@ -223,9 +223,10 @@ ___pthread_barrier_wait (pthread_barrier_t *barrier)
 }
 versioned_symbol (libc, ___pthread_barrier_wait, pthread_barrier_wait,
                   GLIBC_2_34);
-versioned_symbol (libc, ___pthread_barrier_wait, __pthread_barrier_wait,
-                  GLIBC_PRIVATE);
 libc_hidden_ver (___pthread_barrier_wait, __pthread_barrier_wait)
+#ifndef SHARED
+strong_alias (___pthread_barrier_wait, __pthread_barrier_wait)
+#endif
 
 #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34)
 compat_symbol (libpthread, ___pthread_barrier_wait, pthread_barrier_wait,
diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c
index daba8600fe..dc8c511f1a 100644
--- a/nptl/pthread_cond_wait.c
+++ b/nptl/pthread_cond_wait.c
@@ -699,9 +699,10 @@ ___pthread_cond_clockwait (pthread_cond_t *cond, pthread_mutex_t *mutex,
   return __pthread_cond_clockwait64 (cond, mutex, clockid, &ts64);
 }
 #endif /* __TIMESIZE == 64 */
-versioned_symbol (libc, ___pthread_cond_clockwait,
-		  __pthread_cond_clockwait, GLIBC_PRIVATE);
 libc_hidden_ver (___pthread_cond_clockwait, __pthread_cond_clockwait)
+#ifndef SHARED
+strong_alias (___pthread_cond_clockwait, __pthread_cond_clockwait)
+#endif
 versioned_symbol (libc, ___pthread_cond_clockwait,
 		  pthread_cond_clockwait, GLIBC_2_34);
 #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_30, GLIBC_2_34)
diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c
index 5afd6222d6..11ad7005d0 100644
--- a/nptl/pthread_mutex_timedlock.c
+++ b/nptl/pthread_mutex_timedlock.c
@@ -598,9 +598,10 @@ ___pthread_mutex_clocklock (pthread_mutex_t *mutex,
   return ___pthread_mutex_clocklock64 (mutex, clockid, &ts64);
 }
 #endif /* __TIMESPEC64 != 64 */
-versioned_symbol (libc, ___pthread_mutex_clocklock,
-		  __pthread_mutex_clocklock, GLIBC_PRIVATE);
 libc_hidden_ver (___pthread_mutex_clocklock, __pthread_mutex_clocklock)
+#ifndef SHARED
+strong_alias (___pthread_mutex_clocklock, __pthread_mutex_clocklock)
+#endif
 versioned_symbol (libc, ___pthread_mutex_clocklock,
 		  pthread_mutex_clocklock, GLIBC_2_34);
 #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_30, GLIBC_2_34)
diff --git a/nptl/pthread_testcancel.c b/nptl/pthread_testcancel.c
index 920374643a..31185d89f2 100644
--- a/nptl/pthread_testcancel.c
+++ b/nptl/pthread_testcancel.c
@@ -35,9 +35,10 @@ ___pthread_testcancel (void)
     }
 }
 versioned_symbol (libc, ___pthread_testcancel, pthread_testcancel, GLIBC_2_34);
-versioned_symbol (libc, ___pthread_testcancel, __pthread_testcancel,
-                  GLIBC_PRIVATE);
 libc_hidden_ver (___pthread_testcancel, __pthread_testcancel)
+#ifndef SHARED
+strong_alias (___pthread_testcancel, __pthread_testcancel)
+#endif
 
 #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34)
 compat_symbol (libc, ___pthread_testcancel, pthread_testcancel, GLIBC_2_0);
-- 
2.31.1



^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 4/4] elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols
  2021-07-06 17:22 [PATCH 0/4] GLIBC_PRIVATE ABI cleanups Florian Weimer
                   ` (2 preceding siblings ...)
  2021-07-06 17:22 ` [PATCH 3/4] nptl: Reduce the GLIBC_PRIVATE ABI Florian Weimer
@ 2021-07-06 17:22 ` Florian Weimer
  2021-07-06 19:30   ` Adhemerval Zanella
  2021-07-07 10:56 ` [PATCH 0/4] GLIBC_PRIVATE ABI cleanups Szabolcs Nagy
  4 siblings, 1 reply; 15+ messages in thread
From: Florian Weimer @ 2021-07-06 17:22 UTC (permalink / raw)
  To: libc-alpha

They are no longer needed after everything has been moved into
libc.  The _dl_vsym test has to be removed because the symbol
cannot be used outside libc anymore.
---
 dlfcn/dlerror.c              |   1 -
 elf/Makefile                 |  16 ++---
 elf/Versions                 |   3 -
 elf/dl-addr.c                |   1 -
 elf/dl-libc.c                |   4 --
 elf/dl-sym.c                 |   2 -
 elf/tst-libc_dlvsym-dso.c    |  25 -------
 elf/tst-libc_dlvsym-static.c |  32 ---------
 elf/tst-libc_dlvsym.c        |  34 ---------
 elf/tst-libc_dlvsym.h        | 130 -----------------------------------
 include/dlfcn.h              |  30 ++++----
 11 files changed, 18 insertions(+), 260 deletions(-)
 delete mode 100644 elf/tst-libc_dlvsym-dso.c
 delete mode 100644 elf/tst-libc_dlvsym-static.c
 delete mode 100644 elf/tst-libc_dlvsym.c
 delete mode 100644 elf/tst-libc_dlvsym.h

diff --git a/dlfcn/dlerror.c b/dlfcn/dlerror.c
index d0194a7cef..5047b14066 100644
--- a/dlfcn/dlerror.c
+++ b/dlfcn/dlerror.c
@@ -196,4 +196,3 @@ _dlerror_run (void (*operate) (void *), void *args)
       return 1;
     }
 }
-libc_hidden_def (_dlerror_run)
diff --git a/elf/Makefile b/elf/Makefile
index 698a6ab985..b1e01d9516 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -165,7 +165,7 @@ tests-static-normal := tst-leaks1-static tst-array1-static tst-array5-static \
 
 tests-static-internal := tst-tls1-static tst-tls2-static \
 	       tst-ptrguard1-static tst-stackguard1-static \
-	       tst-tls1-static-non-pie tst-libc_dlvsym-static
+	       tst-tls1-static-non-pie
 
 CRT-tst-tls1-static-non-pie := $(csu-objpfx)crt1.o
 tst-tls1-static-non-pie-no-pie = yes
@@ -229,7 +229,7 @@ tests += restest1 preloadtest loadfail multiload origtest resolvfail \
 tests-internal += loadtest unload unload2 circleload1 \
 	 neededtest neededtest2 neededtest3 neededtest4 \
 	 tst-tls3 tst-tls6 tst-tls7 tst-tls8 tst-dlmopen2 \
-	 tst-ptrguard1 tst-stackguard1 tst-libc_dlvsym \
+	 tst-ptrguard1 tst-stackguard1 \
 	 tst-create_format1 tst-tls-surplus tst-dl-hwcaps_split
 tests-container += tst-pldd tst-dlopen-tlsmodid-container \
   tst-dlopen-self-container tst-preload-pthread-libc
@@ -326,7 +326,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
 		tst-audit12mod1 tst-audit12mod2 tst-audit12mod3 tst-auditmod12 \
 		tst-latepthreadmod $(tst-tls-many-dynamic-modules) \
 		tst-nodelete-dlclose-dso tst-nodelete-dlclose-plugin \
-		tst-main1mod tst-libc_dlvsym-dso tst-absolute-sym-lib \
+		tst-main1mod tst-absolute-sym-lib \
 		tst-absolute-zero-lib tst-big-note-lib tst-unwind-ctor-lib \
 		tst-audit13mod1 tst-sonamemove-linkmod1 \
 		tst-sonamemove-runmod1 tst-sonamemove-runmod2 \
@@ -352,7 +352,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
 
 # Most modules build with _ISOMAC defined, but those filtered out
 # depend on internal headers.
-modules-names-tests = $(filter-out ifuncmod% tst-libc_dlvsym-dso tst-tlsmod%,\
+modules-names-tests = $(filter-out ifuncmod% tst-tlsmod%,\
 				   $(modules-names))
 
 ifeq (yes,$(have-mtls-dialect-gnu2))
@@ -1582,14 +1582,6 @@ LDLIBS-tst-absolute-zero-lib.so = tst-absolute-zero-lib.lds
 $(objpfx)tst-absolute-zero-lib.so: $(LDLIBS-tst-absolute-zero-lib.so)
 $(objpfx)tst-absolute-zero: $(objpfx)tst-absolute-zero-lib.so
 
-# Both the main program and the DSO for tst-libc_dlvsym need to link
-# against libdl.
-$(objpfx)tst-libc_dlvsym-dso.so: $(libsupport)
-$(objpfx)tst-libc_dlvsym.out: $(objpfx)tst-libc_dlvsym-dso.so
-tst-libc_dlvsym-static-ENV = \
-  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn
-$(objpfx)tst-libc_dlvsym-static.out: $(objpfx)tst-libc_dlvsym-dso.so
-
 $(objpfx)tst-big-note: $(objpfx)tst-big-note-lib.so
 # Avoid creating an ABI tag note, which may come before the
 # artificial, large note in tst-big-note-lib.o and invalidate the
diff --git a/elf/Versions b/elf/Versions
index a12d64e8db..775aab62af 100644
--- a/elf/Versions
+++ b/elf/Versions
@@ -22,9 +22,6 @@ libc {
 %endif
   GLIBC_PRIVATE {
     # functions used in other libraries
-    _dl_addr;
-    _dl_sym; _dl_vsym;
-    __libc_dlclose; __libc_dlopen_mode; __libc_dlsym; __libc_dlvsym;
     __libc_early_init;
 
     # Internal error handling support.  Interposes the functions in ld.so.
diff --git a/elf/dl-addr.c b/elf/dl-addr.c
index 70a60d5b91..3226880d48 100644
--- a/elf/dl-addr.c
+++ b/elf/dl-addr.c
@@ -142,4 +142,3 @@ _dl_addr (const void *address, Dl_info *info,
 
   return result;
 }
-libc_hidden_def (_dl_addr)
diff --git a/elf/dl-libc.c b/elf/dl-libc.c
index ba792e9589..d5bc4a277f 100644
--- a/elf/dl-libc.c
+++ b/elf/dl-libc.c
@@ -162,7 +162,6 @@ __libc_dlopen_mode (const char *name, int mode)
 #endif
   return dlerror_run (do_dlopen, &args) ? NULL : (void *) args.map;
 }
-libc_hidden_def (__libc_dlopen_mode)
 
 #ifndef SHARED
 void *
@@ -192,7 +191,6 @@ __libc_dlsym (void *map, const char *name)
   return (dlerror_run (do_dlsym, &args) ? NULL
 	  : (void *) (DL_SYMBOL_ADDRESS (args.loadbase, args.ref)));
 }
-libc_hidden_def (__libc_dlsym)
 
 /* Replacement for dlvsym.  MAP must be a real map.  This function
    returns NULL without setting the dlerror value in case of static
@@ -219,7 +217,6 @@ __libc_dlvsym (void *map, const char *name, const char *version)
 	  : (void *) (DL_SYMBOL_ADDRESS (args.dlsym.loadbase,
 					 args.dlsym.ref)));
 }
-libc_hidden_def (__libc_dlvsym)
 
 int
 __libc_dlclose (void *map)
@@ -230,7 +227,6 @@ __libc_dlclose (void *map)
 #endif
   return dlerror_run (do_dlclose, map);
 }
-libc_hidden_def (__libc_dlclose)
 
 
 static bool __libc_freeres_fn_section
diff --git a/elf/dl-sym.c b/elf/dl-sym.c
index fa0cce678f..de5769f926 100644
--- a/elf/dl-sym.c
+++ b/elf/dl-sym.c
@@ -188,11 +188,9 @@ _dl_vsym (void *handle, const char *name, const char *version, void *who)
 
   return do_sym (handle, name, who, &vers, 0);
 }
-libc_hidden_def (_dl_vsym)
 
 void *
 _dl_sym (void *handle, const char *name, void *who)
 {
   return do_sym (handle, name, who, NULL, DL_LOOKUP_RETURN_NEWEST);
 }
-libc_hidden_def (_dl_sym)
diff --git a/elf/tst-libc_dlvsym-dso.c b/elf/tst-libc_dlvsym-dso.c
deleted file mode 100644
index 19091ddb41..0000000000
--- a/elf/tst-libc_dlvsym-dso.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Compare dlvsym and __libc_dlvsym results.  Shared object code.
-   Copyright (C) 2017-2021 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include "tst-libc_dlvsym.h"
-
-void
-compare_vsyms_global (void)
-{
-  compare_vsyms ();
-}
diff --git a/elf/tst-libc_dlvsym-static.c b/elf/tst-libc_dlvsym-static.c
deleted file mode 100644
index 19c438c3cd..0000000000
--- a/elf/tst-libc_dlvsym-static.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Compare dlvsym and __libc_dlvsym results.  Static version.
-   Copyright (C) 2017-2021 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <support/xdlfcn.h>
-
-static int
-do_test (void)
-{
-  void *handle = xdlopen ("tst-libc_dlvsym-dso.so", RTLD_LAZY);
-  void (*compare) (void) = xdlsym (handle, "compare_vsyms_global");
-  compare ();
-  xdlclose (handle);
-
-  return 0;
-}
-
-#include <support/test-driver.c>
diff --git a/elf/tst-libc_dlvsym.c b/elf/tst-libc_dlvsym.c
deleted file mode 100644
index 823643fb1c..0000000000
--- a/elf/tst-libc_dlvsym.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Compare dlvsym and __libc_dlvsym results.  Dynamic version.
-   Copyright (C) 2017-2021 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include "tst-libc_dlvsym.h"
-
-static int
-do_test (void)
-{
-  compare_vsyms ();
-
-  void *handle = xdlopen ("tst-libc_dlvsym-dso.so", RTLD_LAZY);
-  void (*compare) (void) = xdlsym (handle, "compare_vsyms_global");
-  compare ();
-  xdlclose (handle);
-
-  return 0;
-}
-
-#include <support/test-driver.c>
diff --git a/elf/tst-libc_dlvsym.h b/elf/tst-libc_dlvsym.h
deleted file mode 100644
index 1a8f2e9271..0000000000
--- a/elf/tst-libc_dlvsym.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* Compare dlvsym and __libc_dlvsym results.  Common code.
-   Copyright (C) 2017-2021 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-/* compare_vsyms is the main entry point for these tests.
-
-   Indirectly, It calls __libc_dlvsym (from libc.so; internal
-   interface) and dlvsym (from libdl.so; public interface) to compare
-   the results for a selected set of symbols in libc.so which
-   typically have more than one symbol version.  The two functions are
-   implemented by somewhat different code, and this test checks that
-   their results are the same.
-
-   The versions are generated to range from GLIBC_2.0 to GLIBC_2.Y,
-   with Y being the current __GLIBC_MINOR__ version plus two.  In
-   addition, there is a list of special symbol versions of the form
-   GLIBC_2.Y.Z, which were used for some releases.
-
-   Comparing the two dlvsym results at versions which do not actually
-   exist does not test much, but it will not contribute to false test
-   failures, either.  */
-
-#include <array_length.h>
-#include <gnu/lib-names.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <support/check.h>
-#include <support/xdlfcn.h>
-
-/* Run consistency check for versioned symbol NAME@VERSION.  NB: We
-   may execute in a shared object, so exit on error for proper error
-   reporting.  */
-static void
-compare_vsyms_0 (void *libc_handle, const char *name, const char *version,
-                 bool *pfound)
-{
-  void *dlvsym_address = dlvsym (libc_handle, name, version);
-  void *libc_dlvsym_address
-    = __libc_dlvsym (libc_handle, name, version);
-  if (dlvsym_address != libc_dlvsym_address)
-    FAIL_EXIT1 ("%s@%s mismatch: %p != %p",
-                name, version, dlvsym_address, libc_dlvsym_address);
-  if (dlvsym_address != NULL)
-    *pfound = true;
-}
-
-
-/* Run consistency check for versioned symbol NAME at multiple symbol
-   version.  */
-static void
-compare_vsyms_1 (void *libc_handle, const char *name)
-{
-  bool found = false;
-
-  /* Historic versions which do not follow the usual GLIBC_2.Y
-     pattern, to increase test coverage.  Not all architectures have
-     those, but probing additional versions does not hurt.  */
-  static const char special_versions[][12] =
-    {
-      "GLIBC_2.1.1",
-      "GLIBC_2.1.2",
-      "GLIBC_2.1.3",
-      "GLIBC_2.1.4",
-      "GLIBC_2.2.1",
-      "GLIBC_2.2.2",
-      "GLIBC_2.2.3",
-      "GLIBC_2.2.4",
-      "GLIBC_2.2.5",
-      "GLIBC_2.2.6",
-      "GLIBC_2.3.2",
-      "GLIBC_2.3.3",
-      "GLIBC_2.3.4",
-    };
-  for (int i = 0; i < array_length (special_versions); ++i)
-    compare_vsyms_0 (libc_handle, name, special_versions[i], &found);
-
-  /* Iterate to an out-of-range version, to cover some unused symbols
-     as well.  */
-  for (int minor_version = 0; minor_version <= __GLIBC_MINOR__ + 2;
-       ++minor_version)
-    {
-      char version[30];
-      snprintf (version, sizeof (version), "GLIBC_%d.%d",
-                __GLIBC__, minor_version);
-      compare_vsyms_0 (libc_handle, name, version, &found);
-    }
-
-  if (!found)
-    FAIL_EXIT1 ("symbol %s not found at any version", name);
-}
-
-/* Run consistency checks for various symbols which usually have
-   multiple versions.  */
-static void
-compare_vsyms (void)
-{
-  /* The minor version loop in compare_vsyms_1 needs updating in case
-     we ever switch to glibc 3.0.  */
-  if (__GLIBC__ != 2)
-    FAIL_EXIT1 ("unexpected glibc major version: %d", __GLIBC__);
-
-  /* __libc_dlvsym does not recognize the special RTLD_* handles, so
-     obtain an explicit handle for libc.so.  */
-  void *libc_handle = xdlopen (LIBC_SO, RTLD_LAZY | RTLD_NOLOAD);
-
-
-  /* sys_errlist and sys_siglist were deprecated in glibc 2.32 and they are
-     not available on architectures with base ABI newer than 2.32.  */
-#if TEST_COMPAT (libc, GLIBC_2_0, GLIBC_2_32)
-  compare_vsyms_1 (libc_handle, "_sys_errlist");
-  compare_vsyms_1 (libc_handle, "_sys_siglist");
-#endif
-  compare_vsyms_1 (libc_handle, "quick_exit");
-
-  xdlclose (libc_handle);
-}
diff --git a/include/dlfcn.h b/include/dlfcn.h
index d4440c567e..a4c283728f 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -45,20 +45,20 @@ extern char **__libc_argv attribute_hidden;
    better error handling semantics for the library.  */
 #define __libc_dlopen(name) \
   __libc_dlopen_mode (name, RTLD_NOW | __RTLD_DLOPEN)
-extern void *__libc_dlopen_mode  (const char *__name, int __mode);
-extern void *__libc_dlsym   (void *__map, const char *__name);
-extern void *__libc_dlvsym (void *map, const char *name, const char *version);
-extern int   __libc_dlclose (void *__map);
-libc_hidden_proto (__libc_dlopen_mode)
-libc_hidden_proto (__libc_dlsym)
-libc_hidden_proto (__libc_dlvsym)
-libc_hidden_proto (__libc_dlclose)
+extern void *__libc_dlopen_mode  (const char *__name, int __mode)
+  attribute_hidden;
+extern void *__libc_dlsym   (void *__map, const char *__name)
+  attribute_hidden;
+extern void *__libc_dlvsym (void *map, const char *name, const char *version)
+  attribute_hidden;
+extern int   __libc_dlclose (void *__map)
+  attribute_hidden;
 
 /* Locate shared object containing the given address.  */
 #ifdef ElfW
 extern int _dl_addr (const void *address, Dl_info *info,
-		     struct link_map **mapp, const ElfW(Sym) **symbolp);
-libc_hidden_proto (_dl_addr)
+		     struct link_map **mapp, const ElfW(Sym) **symbolp)
+  attribute_hidden;
 #endif
 
 struct link_map;
@@ -73,23 +73,21 @@ extern void _dl_close_worker (struct link_map *map, bool force)
 /* Look up NAME in shared object HANDLE (which may be RTLD_DEFAULT or
    RTLD_NEXT).  WHO is the calling function, for RTLD_NEXT.  Returns
    the symbol value, which may be NULL.  */
-extern void *_dl_sym (void *handle, const char *name, void *who);
-libc_hidden_proto (_dl_sym)
+extern void *_dl_sym (void *handle, const char *name, void *who)
+  attribute_hidden;
 
 /* Look up version VERSION of symbol NAME in shared object HANDLE
    (which may be RTLD_DEFAULT or RTLD_NEXT).  WHO is the calling
    function, for RTLD_NEXT.  Returns the symbol value, which may be
    NULL.  */
 extern void *_dl_vsym (void *handle, const char *name, const char *version,
-		       void *who);
-libc_hidden_proto (_dl_vsym)
+		       void *who) attribute_hidden;
 
 /* Helper function for <dlfcn.h> functions.  Runs the OPERATE function via
    _dl_catch_error.  Returns zero for success, nonzero for failure; and
    arranges for `dlerror' to return the error details.
    ARGS is passed as argument to OPERATE.  */
-extern int _dlerror_run (void (*operate) (void *), void *args);
-libc_hidden_proto (_dlerror_run)
+extern int _dlerror_run (void (*operate) (void *), void *args) attribute_hidden;
 
 /* This structure is used to make the outer (statically linked)
    implementation of dlopen and related functions to the inner libc
-- 
2.31.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/4] nptl: Use internal low-level lock type for !IS_IN (libc)
  2021-07-06 17:22 ` [PATCH 1/4] nptl: Use internal low-level lock type for !IS_IN (libc) Florian Weimer
@ 2021-07-06 19:24   ` Adhemerval Zanella
  0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2021-07-06 19:24 UTC (permalink / raw)
  To: Florian Weimer, libc-alpha



On 06/07/2021 14:22, Florian Weimer via Libc-alpha wrote:
> This avoids an ABI hazard (types changing between different modules
> of glibc) without introducing linknamespace issues. In particular,
> NSS modules now call __lll_lock_wait_private@@GLIBC_PRIVATE to wait
> on internal locks (the unlock path is inlined and performs a direct
> system call).

LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
>  sysdeps/nptl/libc-lockP.h | 51 ++++-----------------------------------
>  1 file changed, 5 insertions(+), 46 deletions(-)
> 
> diff --git a/sysdeps/nptl/libc-lockP.h b/sysdeps/nptl/libc-lockP.h
> index ef88a3e533..b66c938e44 100644
> --- a/sysdeps/nptl/libc-lockP.h
> +++ b/sysdeps/nptl/libc-lockP.h
> @@ -33,18 +33,8 @@
>  #include <lowlevellock.h>
>  #include <tls.h>
>  
> -#if IS_IN (libpthread)
> -/* This gets us the declarations of the __pthread_* internal names,
> -   and hidden_proto for them.  */
> -# include <pthreadP.h>
> -#endif
> -
>  /* Mutex type.  */
> -#if !IS_IN (libc) && !IS_IN (libpthread)
> -typedef pthread_mutex_t __libc_lock_t;
> -#else
>  typedef int __libc_lock_t;
> -#endif
>  typedef struct { pthread_mutex_t mutex; } __rtld_lock_recursive_t;
>  typedef pthread_rwlock_t __libc_rwlock_t;
>  
> @@ -108,56 +98,25 @@ _Static_assert (LLL_LOCK_INITIALIZER == 0, "LLL_LOCK_INITIALIZER != 0");
>  
>  /* Initialize the named lock variable, leaving it in a consistent, unlocked
>     state.  */
> -#if IS_IN (libc) || IS_IN (libpthread)
> -# define __libc_lock_init(NAME) \
> -  ((void) ((NAME) = LLL_LOCK_INITIALIZER))
> -#else
> -# define __libc_lock_init(NAME) __pthread_mutex_init (&(NAME))
> -#endif
> +#define __libc_lock_init(NAME) ((void) ((NAME) = LLL_LOCK_INITIALIZER))
>  #define __libc_rwlock_init(NAME) __pthread_rwlock_init (&(NAME), NULL)
>  
>  /* Finalize the named lock variable, which must be locked.  It cannot be
>     used again until __libc_lock_init is called again on it.  This must be
>     called on a lock variable before the containing storage is reused.  */
> -#if IS_IN (libc) || IS_IN (libpthread)
> -# define __libc_lock_fini(NAME) ((void) 0)
> -#else
> -# define __libc_lock_fini(NAME) __pthread_mutex_destroy (&(NAME))
> -#endif
> +#define __libc_lock_fini(NAME) ((void) 0)
>  #define __libc_rwlock_fini(NAME) ((void) 0)
>  
>  /* Lock the named lock variable.  */
> -#if IS_IN (libc) || IS_IN (libpthread)
> -# ifndef __libc_lock_lock
> -#  define __libc_lock_lock(NAME) \
> -  ({ lll_lock (NAME, LLL_PRIVATE); 0; })
> -# endif
> -#else
> -# undef __libc_lock_lock
> -# define __libc_lock_lock(NAME) __pthread_mutex_lock (&(NAME))
> -#endif
> +#define __libc_lock_lock(NAME) ({ lll_lock (NAME, LLL_PRIVATE); 0; })
>  #define __libc_rwlock_rdlock(NAME) __pthread_rwlock_rdlock (&(NAME))
>  #define __libc_rwlock_wrlock(NAME) __pthread_rwlock_wrlock (&(NAME))
>  
>  /* Try to lock the named lock variable.  */
> -#if IS_IN (libc) || IS_IN (libpthread)
> -# ifndef __libc_lock_trylock
> -#  define __libc_lock_trylock(NAME) \
> -  lll_trylock (NAME)
> -# endif
> -#else
> -# undef __libc_lock_trylock
> -# define __libc_lock_trylock(NAME) \
> -  __libc_maybe_call (__pthread_mutex_trylock, (&(NAME)), 0)
> -#endif
> +#define __libc_lock_trylock(NAME) lll_trylock (NAME)
>  
>  /* Unlock the named lock variable.  */
> -#if IS_IN (libc) || IS_IN (libpthread)
> -# define __libc_lock_unlock(NAME) \
> -  lll_unlock (NAME, LLL_PRIVATE)
> -#else
> -# define __libc_lock_unlock(NAME) __pthread_mutex_unlock (&(NAME))
> -#endif
> +#define __libc_lock_unlock(NAME) lll_unlock (NAME, LLL_PRIVATE)
>  #define __libc_rwlock_unlock(NAME) __pthread_rwlock_unlock (&(NAME))
>  
>  #if IS_IN (rtld)
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/4] nptl: Remove GLIBC_2.34 versions of __pthread_mutex_lock, __pthread_mutex_unlock
  2021-07-06 17:22 ` [PATCH 2/4] nptl: Remove GLIBC_2.34 versions of __pthread_mutex_lock, __pthread_mutex_unlock Florian Weimer
@ 2021-07-06 19:25   ` Adhemerval Zanella
  0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2021-07-06 19:25 UTC (permalink / raw)
  To: Florian Weimer, libc-alpha



On 06/07/2021 14:22, Florian Weimer via Libc-alpha wrote:
> Now that there are no internal users anymore, these new symbol
> versions can be removed from the public ABI.  The compatibility
> symbols remain.

LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
>  nptl/Versions                                                | 2 --
>  nptl/pthread_mutex_lock.c                                    | 5 +++--
>  nptl/pthread_mutex_unlock.c                                  | 5 +++--
>  sysdeps/unix/sysv/linux/aarch64/libc.abilist                 | 2 --
>  sysdeps/unix/sysv/linux/alpha/libc.abilist                   | 2 --
>  sysdeps/unix/sysv/linux/arc/libc.abilist                     | 2 --
>  sysdeps/unix/sysv/linux/arm/be/libc.abilist                  | 2 --
>  sysdeps/unix/sysv/linux/arm/le/libc.abilist                  | 2 --
>  sysdeps/unix/sysv/linux/csky/libc.abilist                    | 2 --
>  sysdeps/unix/sysv/linux/hppa/libc.abilist                    | 2 --
>  sysdeps/unix/sysv/linux/i386/libc.abilist                    | 2 --
>  sysdeps/unix/sysv/linux/ia64/libc.abilist                    | 2 --
>  sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist           | 2 --
>  sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist             | 2 --
>  sysdeps/unix/sysv/linux/microblaze/be/libc.abilist           | 2 --
>  sysdeps/unix/sysv/linux/microblaze/le/libc.abilist           | 2 --
>  sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist         | 2 --
>  sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist       | 2 --
>  sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist         | 2 --
>  sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist         | 2 --
>  sysdeps/unix/sysv/linux/nios2/libc.abilist                   | 2 --
>  sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist   | 2 --
>  sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist | 2 --
>  sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist    | 2 --
>  sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist    | 2 --
>  sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist              | 2 --
>  sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist              | 2 --
>  sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist            | 2 --
>  sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist            | 2 --
>  sysdeps/unix/sysv/linux/sh/be/libc.abilist                   | 2 --
>  sysdeps/unix/sysv/linux/sh/le/libc.abilist                   | 2 --
>  sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist           | 2 --
>  sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist           | 2 --
>  sysdeps/unix/sysv/linux/x86_64/64/libc.abilist               | 2 --
>  sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist              | 2 --
>  35 files changed, 6 insertions(+), 70 deletions(-)
> 
> diff --git a/nptl/Versions b/nptl/Versions
> index 060d8d5dec..0a1c75509a 100644
> --- a/nptl/Versions
> +++ b/nptl/Versions
> @@ -253,8 +253,6 @@ libc {
>    GLIBC_2.34 {
>      __pthread_cleanup_routine;
>      __pthread_key_create;
> -    __pthread_mutex_lock;
> -    __pthread_mutex_unlock;
>      __pthread_register_cancel;
>      __pthread_register_cancel_defer;
>      __pthread_unregister_cancel;

Ok.

> diff --git a/nptl/pthread_mutex_lock.c b/nptl/pthread_mutex_lock.c
> index c9e438ef37..da624f322d 100644
> --- a/nptl/pthread_mutex_lock.c
> +++ b/nptl/pthread_mutex_lock.c
> @@ -609,9 +609,10 @@ __pthread_mutex_lock_full (pthread_mutex_t *mutex)
>  }
>  
>  #if PTHREAD_MUTEX_VERSIONS
> -versioned_symbol (libpthread, ___pthread_mutex_lock, __pthread_mutex_lock,
> -		  GLIBC_2_34);
>  libc_hidden_ver (___pthread_mutex_lock, __pthread_mutex_lock)
> +# ifndef SHARED
> +strong_alias (___pthread_mutex_lock, __pthread_mutex_lock)
> +# endif
>  versioned_symbol (libpthread, ___pthread_mutex_lock, pthread_mutex_lock,
>  		  GLIBC_2_0);
>  
> diff --git a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c
> index ea88ba2986..7c15397572 100644
> --- a/nptl/pthread_mutex_unlock.c
> +++ b/nptl/pthread_mutex_unlock.c
> @@ -368,9 +368,10 @@ ___pthread_mutex_unlock (pthread_mutex_t *mutex)
>  {
>    return __pthread_mutex_unlock_usercnt (mutex, 1);
>  }
> -versioned_symbol (libpthread, ___pthread_mutex_unlock, __pthread_mutex_unlock,
> -		  GLIBC_2_34);
>  libc_hidden_ver (___pthread_mutex_unlock, __pthread_mutex_unlock)
> +#ifndef SHARED
> +strong_alias (___pthread_mutex_unlock, __pthread_mutex_unlock)
> +#endif
>  versioned_symbol (libpthread, ___pthread_mutex_unlock, pthread_mutex_unlock,
>  		  GLIBC_2_0);
>  

Ok.

> diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
> index 6730cbdd6b..6f19b07b47 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
> @@ -2384,8 +2384,6 @@ GLIBC_2.34 __libc_start_main F
>  GLIBC_2.34 __mq_open_2 F
>  GLIBC_2.34 __pthread_cleanup_routine F
>  GLIBC_2.34 __pthread_key_create F
> -GLIBC_2.34 __pthread_mutex_lock F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_unregister_cancel F
> diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
> index 63de4fadc3..6ece449d4b 100644
> --- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
> @@ -2483,8 +2483,6 @@ GLIBC_2.34 __libc_start_main F
>  GLIBC_2.34 __mq_open_2 F
>  GLIBC_2.34 __pthread_cleanup_routine F
>  GLIBC_2.34 __pthread_key_create F
> -GLIBC_2.34 __pthread_mutex_lock F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_unregister_cancel F
> diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist
> index 2f13701fd7..3bf846349f 100644
> --- a/sysdeps/unix/sysv/linux/arc/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/arc/libc.abilist
> @@ -2143,8 +2143,6 @@ GLIBC_2.34 __libc_start_main F
>  GLIBC_2.34 __mq_open_2 F
>  GLIBC_2.34 __pthread_cleanup_routine F
>  GLIBC_2.34 __pthread_key_create F
> -GLIBC_2.34 __pthread_mutex_lock F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_unregister_cancel F
> diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
> index 9b824f1605..08be998d35 100644
> --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
> @@ -245,9 +245,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
> index 443a81b8f7..ebd767ed96 100644
> --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
> @@ -242,9 +242,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
> index 243de3cf93..4a467e706e 100644
> --- a/sysdeps/unix/sysv/linux/csky/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
> @@ -2377,9 +2377,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
> index 24ae58bb6f..bdef8d2a34 100644
> --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
> @@ -2330,9 +2330,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
> index 09bebcd5a1..eba95a2cf0 100644
> --- a/sysdeps/unix/sysv/linux/i386/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
> @@ -2514,9 +2514,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist
> index 0bafe09253..3fbc5ae978 100644
> --- a/sysdeps/unix/sysv/linux/ia64/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist
> @@ -2321,8 +2321,6 @@ GLIBC_2.34 __libc_start_main F
>  GLIBC_2.34 __mq_open_2 F
>  GLIBC_2.34 __pthread_cleanup_routine F
>  GLIBC_2.34 __pthread_key_create F
> -GLIBC_2.34 __pthread_mutex_lock F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_unregister_cancel F
> diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
> index c1fcde4c24..0aef2ec43a 100644
> --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
> @@ -246,9 +246,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
> index 407651cfd7..a4704f7e96 100644
> --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
> @@ -2457,9 +2457,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
> index 7da722a734..8f135f30c0 100644
> --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
> @@ -2428,9 +2428,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
> index c374607b81..719609ac10 100644
> --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
> @@ -2425,9 +2425,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
> index b1f426e053..f9a6bccdc5 100644
> --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
> @@ -2422,9 +2422,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
> index 066ceb2258..cee02495c6 100644
> --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
> @@ -2420,9 +2420,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
> index 51c563ebbe..c9fdfe3a55 100644
> --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
> @@ -2428,9 +2428,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
> index 28db715d8a..d27c97094e 100644
> --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
> @@ -2372,8 +2372,6 @@ GLIBC_2.34 __libc_start_main F
>  GLIBC_2.34 __mq_open_2 F
>  GLIBC_2.34 __pthread_cleanup_routine F
>  GLIBC_2.34 __pthread_key_create F
> -GLIBC_2.34 __pthread_mutex_lock F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_unregister_cancel F
> diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
> index ab9f2bd42c..25f270403f 100644
> --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
> @@ -2467,9 +2467,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
> index 83f8513e17..0256a272dd 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
> @@ -2484,9 +2484,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
> index 0fad357bf6..946f855c64 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
> @@ -2517,9 +2517,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
> index 424ec8d953..602da17327 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
> @@ -2285,8 +2285,6 @@ GLIBC_2.34 __libc_start_main F
>  GLIBC_2.34 __mq_open_2 F
>  GLIBC_2.34 __pthread_cleanup_routine F
>  GLIBC_2.34 __pthread_key_create F
> -GLIBC_2.34 __pthread_mutex_lock F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_unregister_cancel F
> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
> index 9909fd0e9a..287285a21a 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
> @@ -2580,8 +2580,6 @@ GLIBC_2.34 __libc_start_main F
>  GLIBC_2.34 __mq_open_2 F
>  GLIBC_2.34 __pthread_cleanup_routine F
>  GLIBC_2.34 __pthread_key_create F
> -GLIBC_2.34 __pthread_mutex_lock F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_unregister_cancel F
> diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
> index 7085989b16..cdeee28d0f 100644
> --- a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
> @@ -2145,8 +2145,6 @@ GLIBC_2.34 __libc_start_main F
>  GLIBC_2.34 __mq_open_2 F
>  GLIBC_2.34 __pthread_cleanup_routine F
>  GLIBC_2.34 __pthread_key_create F
> -GLIBC_2.34 __pthread_mutex_lock F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_unregister_cancel F
> diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
> index a855997957..a74b54d6bb 100644
> --- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
> @@ -2345,8 +2345,6 @@ GLIBC_2.34 __libc_start_main F
>  GLIBC_2.34 __mq_open_2 F
>  GLIBC_2.34 __pthread_cleanup_routine F
>  GLIBC_2.34 __pthread_key_create F
> -GLIBC_2.34 __pthread_mutex_lock F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_unregister_cancel F
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
> index 12aeb82520..e96371317c 100644
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
> @@ -2482,9 +2482,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
> index e2d746ad5f..aadc7c1d66 100644
> --- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
> @@ -2322,8 +2322,6 @@ GLIBC_2.34 __libc_start_main F
>  GLIBC_2.34 __mq_open_2 F
>  GLIBC_2.34 __pthread_cleanup_routine F
>  GLIBC_2.34 __pthread_key_create F
> -GLIBC_2.34 __pthread_mutex_lock F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_unregister_cancel F
> diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
> index 1ce4b54bf2..cc4a625cb4 100644
> --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
> @@ -2337,9 +2337,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
> index 7d01add713..163d2cd613 100644
> --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
> @@ -2334,9 +2334,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
> index b5ef3247d7..6eceee6b88 100644
> --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
> @@ -2477,9 +2477,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
>  GLIBC_2.34 __pthread_cond_timedwait64 F
>  GLIBC_2.34 __pthread_key_create F
>  GLIBC_2.34 __pthread_mutex_clocklock64 F
> -GLIBC_2.34 __pthread_mutex_lock F
>  GLIBC_2.34 __pthread_mutex_timedlock64 F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
> diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
> index 14ae7c8417..e6bac469ba 100644
> --- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
> @@ -2344,8 +2344,6 @@ GLIBC_2.34 __libc_start_main F
>  GLIBC_2.34 __mq_open_2 F
>  GLIBC_2.34 __pthread_cleanup_routine F
>  GLIBC_2.34 __pthread_key_create F
> -GLIBC_2.34 __pthread_mutex_lock F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_unregister_cancel F
> diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
> index 57c4f28d17..e90f3e54c0 100644
> --- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
> @@ -2300,8 +2300,6 @@ GLIBC_2.34 __libc_start_main F
>  GLIBC_2.34 __mq_open_2 F
>  GLIBC_2.34 __pthread_cleanup_routine F
>  GLIBC_2.34 __pthread_key_create F
> -GLIBC_2.34 __pthread_mutex_lock F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_unregister_cancel F
> diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
> index 47211abe4e..792f681bba 100644
> --- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
> @@ -2399,8 +2399,6 @@ GLIBC_2.34 __libc_start_main F
>  GLIBC_2.34 __mq_open_2 F
>  GLIBC_2.34 __pthread_cleanup_routine F
>  GLIBC_2.34 __pthread_key_create F
> -GLIBC_2.34 __pthread_mutex_lock F
> -GLIBC_2.34 __pthread_mutex_unlock F
>  GLIBC_2.34 __pthread_register_cancel F
>  GLIBC_2.34 __pthread_register_cancel_defer F
>  GLIBC_2.34 __pthread_unregister_cancel F
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/4] nptl: Reduce the GLIBC_PRIVATE ABI
  2021-07-06 17:22 ` [PATCH 3/4] nptl: Reduce the GLIBC_PRIVATE ABI Florian Weimer
@ 2021-07-06 19:26   ` Adhemerval Zanella
  0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2021-07-06 19:26 UTC (permalink / raw)
  To: Florian Weimer, libc-alpha



On 06/07/2021 14:22, Florian Weimer via Libc-alpha wrote:
> The remaining symbols are mostly used by libthread_db.
> __pthread_get_minstack has to remain exported even though unused.

LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
>  nptl/Versions                  | 42 ----------------------------------
>  nptl/pthread_barrier_init.c    |  5 ++--
>  nptl/pthread_barrier_wait.c    |  5 ++--
>  nptl/pthread_cond_wait.c       |  5 ++--
>  nptl/pthread_mutex_timedlock.c |  5 ++--
>  nptl/pthread_testcancel.c      |  5 ++--
>  6 files changed, 15 insertions(+), 52 deletions(-)
> 
> diff --git a/nptl/Versions b/nptl/Versions
> index 0a1c75509a..2a75f013f2 100644
> --- a/nptl/Versions
> +++ b/nptl/Versions
> @@ -379,59 +379,17 @@ libc {
>      tss_set;
>    }
>    GLIBC_PRIVATE {
> -    __default_pthread_attr;
> -    __default_pthread_attr_lock;
> -    __futex_abstimed_wait64;
> -    __futex_abstimed_wait_cancelable64;
> -    __init_sched_fifo_prio;
>      __libc_alloca_cutoff;
> -    __libc_cleanup_pop_restore;
> -    __libc_cleanup_push_defer;
> -    __libc_dl_error_tsd;
> -    __libc_multiple_threads;
> -    __lll_clocklock_elision;
> -    __lll_lock_elision;
> -    __lll_lock_wait;
>      __lll_lock_wait_private;
> -    __lll_trylock_elision;
> -    __lll_unlock_elision;
> -    __mutex_aconf;
>      __nptl_create_event;
> -    __nptl_deallocate_stack;
> -    __nptl_deallocate_tsd;
>      __nptl_death_event;
> -    __nptl_free_tcb;
>      __nptl_last_event;
>      __nptl_nthreads;
>      __nptl_rtld_global;
> -    __nptl_setxid_sighandler;
> -    __nptl_stack_list_add;
> -    __nptl_stack_list_del;
>      __nptl_threads_events;
>      __nptl_version;
> -    __pthread_attr_copy;
> -    __pthread_attr_destroy;
> -    __pthread_attr_init;
> -    __pthread_attr_setaffinity_np;
> -    __pthread_attr_setsigmask_internal;
> -    __pthread_barrier_init;
> -    __pthread_barrier_wait;
> -    __pthread_cleanup_pop;
> -    __pthread_cleanup_push;
> -    __pthread_cleanup_upto;
> -    __pthread_current_priority;
> -    __pthread_disable_asynccancel;
> -    __pthread_enable_asynccancel;
> -    __pthread_force_elision;
>      __pthread_get_minstack;
>      __pthread_keys;
> -    __pthread_mutex_unlock_usercnt;
> -    __pthread_setcancelstate;
> -    __pthread_testcancel;
> -    __pthread_tpp_change_priority;
> -    __pthread_unwind;
> -    __sched_fifo_max_prio;
> -    __sched_fifo_min_prio;
>      _thread_db___nptl_last_event;
>      _thread_db___nptl_nthreads;
>      _thread_db___nptl_rtld_global;

Ok.

> diff --git a/nptl/pthread_barrier_init.c b/nptl/pthread_barrier_init.c
> index 3a13d2a756..4aa3b8c0d9 100644
> --- a/nptl/pthread_barrier_init.c
> +++ b/nptl/pthread_barrier_init.c
> @@ -63,9 +63,10 @@ ___pthread_barrier_init (pthread_barrier_t *barrier,
>  }
>  versioned_symbol (libc, ___pthread_barrier_init, pthread_barrier_init,
>                    GLIBC_2_34);
> -versioned_symbol (libc, ___pthread_barrier_init, __pthread_barrier_init,
> -                  GLIBC_PRIVATE);
>  libc_hidden_ver (___pthread_barrier_init, __pthread_barrier_init)
> +#ifndef SHARED
> +strong_alias (___pthread_barrier_init, __pthread_barrier_init)
> +#endif
>  
>  #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34)
>  compat_symbol (libpthread, ___pthread_barrier_init, pthread_barrier_init,

Ok.

> diff --git a/nptl/pthread_barrier_wait.c b/nptl/pthread_barrier_wait.c
> index 4f8abe16bb..10b68c1c35 100644
> --- a/nptl/pthread_barrier_wait.c
> +++ b/nptl/pthread_barrier_wait.c
> @@ -223,9 +223,10 @@ ___pthread_barrier_wait (pthread_barrier_t *barrier)
>  }
>  versioned_symbol (libc, ___pthread_barrier_wait, pthread_barrier_wait,
>                    GLIBC_2_34);
> -versioned_symbol (libc, ___pthread_barrier_wait, __pthread_barrier_wait,
> -                  GLIBC_PRIVATE);
>  libc_hidden_ver (___pthread_barrier_wait, __pthread_barrier_wait)
> +#ifndef SHARED
> +strong_alias (___pthread_barrier_wait, __pthread_barrier_wait)
> +#endif
>  
>  #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34)
>  compat_symbol (libpthread, ___pthread_barrier_wait, pthread_barrier_wait,

Ok.

> diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c
> index daba8600fe..dc8c511f1a 100644
> --- a/nptl/pthread_cond_wait.c
> +++ b/nptl/pthread_cond_wait.c
> @@ -699,9 +699,10 @@ ___pthread_cond_clockwait (pthread_cond_t *cond, pthread_mutex_t *mutex,
>    return __pthread_cond_clockwait64 (cond, mutex, clockid, &ts64);
>  }
>  #endif /* __TIMESIZE == 64 */
> -versioned_symbol (libc, ___pthread_cond_clockwait,
> -		  __pthread_cond_clockwait, GLIBC_PRIVATE);
>  libc_hidden_ver (___pthread_cond_clockwait, __pthread_cond_clockwait)
> +#ifndef SHARED
> +strong_alias (___pthread_cond_clockwait, __pthread_cond_clockwait)
> +#endif
>  versioned_symbol (libc, ___pthread_cond_clockwait,
>  		  pthread_cond_clockwait, GLIBC_2_34);
>  #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_30, GLIBC_2_34)

Ok.

> diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c
> index 5afd6222d6..11ad7005d0 100644
> --- a/nptl/pthread_mutex_timedlock.c
> +++ b/nptl/pthread_mutex_timedlock.c
> @@ -598,9 +598,10 @@ ___pthread_mutex_clocklock (pthread_mutex_t *mutex,
>    return ___pthread_mutex_clocklock64 (mutex, clockid, &ts64);
>  }
>  #endif /* __TIMESPEC64 != 64 */
> -versioned_symbol (libc, ___pthread_mutex_clocklock,
> -		  __pthread_mutex_clocklock, GLIBC_PRIVATE);
>  libc_hidden_ver (___pthread_mutex_clocklock, __pthread_mutex_clocklock)
> +#ifndef SHARED
> +strong_alias (___pthread_mutex_clocklock, __pthread_mutex_clocklock)
> +#endif
>  versioned_symbol (libc, ___pthread_mutex_clocklock,
>  		  pthread_mutex_clocklock, GLIBC_2_34);
>  #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_30, GLIBC_2_34)

Ok.

> diff --git a/nptl/pthread_testcancel.c b/nptl/pthread_testcancel.c
> index 920374643a..31185d89f2 100644
> --- a/nptl/pthread_testcancel.c
> +++ b/nptl/pthread_testcancel.c
> @@ -35,9 +35,10 @@ ___pthread_testcancel (void)
>      }
>  }
>  versioned_symbol (libc, ___pthread_testcancel, pthread_testcancel, GLIBC_2_34);
> -versioned_symbol (libc, ___pthread_testcancel, __pthread_testcancel,
> -                  GLIBC_PRIVATE);
>  libc_hidden_ver (___pthread_testcancel, __pthread_testcancel)
> +#ifndef SHARED
> +strong_alias (___pthread_testcancel, __pthread_testcancel)
> +#endif
>  
>  #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34)
>  compat_symbol (libc, ___pthread_testcancel, pthread_testcancel, GLIBC_2_0);
> 

Ok.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 4/4] elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols
  2021-07-06 17:22 ` [PATCH 4/4] elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols Florian Weimer
@ 2021-07-06 19:30   ` Adhemerval Zanella
  2021-07-07  6:42     ` Florian Weimer
  0 siblings, 1 reply; 15+ messages in thread
From: Adhemerval Zanella @ 2021-07-06 19:30 UTC (permalink / raw)
  To: Florian Weimer, libc-alpha



On 06/07/2021 14:22, Florian Weimer via Libc-alpha wrote:
> They are no longer needed after everything has been moved into
> libc.  The _dl_vsym test has to be removed because the symbol
> cannot be used outside libc anymore.

Is the testing not failing because it is binding to GLIBC_PRIVATE?

LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
>  dlfcn/dlerror.c              |   1 -
>  elf/Makefile                 |  16 ++---
>  elf/Versions                 |   3 -
>  elf/dl-addr.c                |   1 -
>  elf/dl-libc.c                |   4 --
>  elf/dl-sym.c                 |   2 -
>  elf/tst-libc_dlvsym-dso.c    |  25 -------
>  elf/tst-libc_dlvsym-static.c |  32 ---------
>  elf/tst-libc_dlvsym.c        |  34 ---------
>  elf/tst-libc_dlvsym.h        | 130 -----------------------------------
>  include/dlfcn.h              |  30 ++++----
>  11 files changed, 18 insertions(+), 260 deletions(-)
>  delete mode 100644 elf/tst-libc_dlvsym-dso.c
>  delete mode 100644 elf/tst-libc_dlvsym-static.c
>  delete mode 100644 elf/tst-libc_dlvsym.c
>  delete mode 100644 elf/tst-libc_dlvsym.h
> 
> diff --git a/dlfcn/dlerror.c b/dlfcn/dlerror.c
> index d0194a7cef..5047b14066 100644
> --- a/dlfcn/dlerror.c
> +++ b/dlfcn/dlerror.c
> @@ -196,4 +196,3 @@ _dlerror_run (void (*operate) (void *), void *args)
>        return 1;
>      }
>  }
> -libc_hidden_def (_dlerror_run)

Ok.

> diff --git a/elf/Makefile b/elf/Makefile
> index 698a6ab985..b1e01d9516 100644
> --- a/elf/Makefile
> +++ b/elf/Makefile
> @@ -165,7 +165,7 @@ tests-static-normal := tst-leaks1-static tst-array1-static tst-array5-static \
>  
>  tests-static-internal := tst-tls1-static tst-tls2-static \
>  	       tst-ptrguard1-static tst-stackguard1-static \
> -	       tst-tls1-static-non-pie tst-libc_dlvsym-static
> +	       tst-tls1-static-non-pie
>  
>  CRT-tst-tls1-static-non-pie := $(csu-objpfx)crt1.o
>  tst-tls1-static-non-pie-no-pie = yes

Ok.

> @@ -229,7 +229,7 @@ tests += restest1 preloadtest loadfail multiload origtest resolvfail \
>  tests-internal += loadtest unload unload2 circleload1 \
>  	 neededtest neededtest2 neededtest3 neededtest4 \
>  	 tst-tls3 tst-tls6 tst-tls7 tst-tls8 tst-dlmopen2 \
> -	 tst-ptrguard1 tst-stackguard1 tst-libc_dlvsym \
> +	 tst-ptrguard1 tst-stackguard1 \
>  	 tst-create_format1 tst-tls-surplus tst-dl-hwcaps_split
>  tests-container += tst-pldd tst-dlopen-tlsmodid-container \
>    tst-dlopen-self-container tst-preload-pthread-libc

Ok.

> @@ -326,7 +326,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
>  		tst-audit12mod1 tst-audit12mod2 tst-audit12mod3 tst-auditmod12 \
>  		tst-latepthreadmod $(tst-tls-many-dynamic-modules) \
>  		tst-nodelete-dlclose-dso tst-nodelete-dlclose-plugin \
> -		tst-main1mod tst-libc_dlvsym-dso tst-absolute-sym-lib \
> +		tst-main1mod tst-absolute-sym-lib \
>  		tst-absolute-zero-lib tst-big-note-lib tst-unwind-ctor-lib \
>  		tst-audit13mod1 tst-sonamemove-linkmod1 \
>  		tst-sonamemove-runmod1 tst-sonamemove-runmod2 \

Ok.

> @@ -352,7 +352,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
>  
>  # Most modules build with _ISOMAC defined, but those filtered out
>  # depend on internal headers.
> -modules-names-tests = $(filter-out ifuncmod% tst-libc_dlvsym-dso tst-tlsmod%,\
> +modules-names-tests = $(filter-out ifuncmod% tst-tlsmod%,\
>  				   $(modules-names))
>  
>  ifeq (yes,$(have-mtls-dialect-gnu2))
> @@ -1582,14 +1582,6 @@ LDLIBS-tst-absolute-zero-lib.so = tst-absolute-zero-lib.lds
>  $(objpfx)tst-absolute-zero-lib.so: $(LDLIBS-tst-absolute-zero-lib.so)
>  $(objpfx)tst-absolute-zero: $(objpfx)tst-absolute-zero-lib.so
>  
> -# Both the main program and the DSO for tst-libc_dlvsym need to link
> -# against libdl.
> -$(objpfx)tst-libc_dlvsym-dso.so: $(libsupport)
> -$(objpfx)tst-libc_dlvsym.out: $(objpfx)tst-libc_dlvsym-dso.so
> -tst-libc_dlvsym-static-ENV = \
> -  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn
> -$(objpfx)tst-libc_dlvsym-static.out: $(objpfx)tst-libc_dlvsym-dso.so
> -
>  $(objpfx)tst-big-note: $(objpfx)tst-big-note-lib.so
>  # Avoid creating an ABI tag note, which may come before the
>  # artificial, large note in tst-big-note-lib.o and invalidate the

Ok.

> diff --git a/elf/Versions b/elf/Versions
> index a12d64e8db..775aab62af 100644
> --- a/elf/Versions
> +++ b/elf/Versions
> @@ -22,9 +22,6 @@ libc {
>  %endif
>    GLIBC_PRIVATE {
>      # functions used in other libraries
> -    _dl_addr;
> -    _dl_sym; _dl_vsym;
> -    __libc_dlclose; __libc_dlopen_mode; __libc_dlsym; __libc_dlvsym;
>      __libc_early_init;
>  
>      # Internal error handling support.  Interposes the functions in ld.so.

Ok.

> diff --git a/elf/dl-addr.c b/elf/dl-addr.c
> index 70a60d5b91..3226880d48 100644
> --- a/elf/dl-addr.c
> +++ b/elf/dl-addr.c
> @@ -142,4 +142,3 @@ _dl_addr (const void *address, Dl_info *info,
>  
>    return result;
>  }
> -libc_hidden_def (_dl_addr)

Ok.

> diff --git a/elf/dl-libc.c b/elf/dl-libc.c
> index ba792e9589..d5bc4a277f 100644
> --- a/elf/dl-libc.c
> +++ b/elf/dl-libc.c
> @@ -162,7 +162,6 @@ __libc_dlopen_mode (const char *name, int mode)
>  #endif
>    return dlerror_run (do_dlopen, &args) ? NULL : (void *) args.map;
>  }
> -libc_hidden_def (__libc_dlopen_mode)
>  
>  #ifndef SHARED
>  void *
> @@ -192,7 +191,6 @@ __libc_dlsym (void *map, const char *name)
>    return (dlerror_run (do_dlsym, &args) ? NULL
>  	  : (void *) (DL_SYMBOL_ADDRESS (args.loadbase, args.ref)));
>  }
> -libc_hidden_def (__libc_dlsym)
>  
>  /* Replacement for dlvsym.  MAP must be a real map.  This function
>     returns NULL without setting the dlerror value in case of static
> @@ -219,7 +217,6 @@ __libc_dlvsym (void *map, const char *name, const char *version)
>  	  : (void *) (DL_SYMBOL_ADDRESS (args.dlsym.loadbase,
>  					 args.dlsym.ref)));
>  }
> -libc_hidden_def (__libc_dlvsym)
>  
>  int
>  __libc_dlclose (void *map)
> @@ -230,7 +227,6 @@ __libc_dlclose (void *map)
>  #endif
>    return dlerror_run (do_dlclose, map);
>  }
> -libc_hidden_def (__libc_dlclose)
>  
>  
>  static bool __libc_freeres_fn_section

Ok.

> diff --git a/elf/dl-sym.c b/elf/dl-sym.c
> index fa0cce678f..de5769f926 100644
> --- a/elf/dl-sym.c
> +++ b/elf/dl-sym.c
> @@ -188,11 +188,9 @@ _dl_vsym (void *handle, const char *name, const char *version, void *who)
>  
>    return do_sym (handle, name, who, &vers, 0);
>  }
> -libc_hidden_def (_dl_vsym)
>  
>  void *
>  _dl_sym (void *handle, const char *name, void *who)
>  {
>    return do_sym (handle, name, who, NULL, DL_LOOKUP_RETURN_NEWEST);
>  }
> -libc_hidden_def (_dl_sym)

Ok.

> diff --git a/elf/tst-libc_dlvsym-dso.c b/elf/tst-libc_dlvsym-dso.c
> deleted file mode 100644
> index 19091ddb41..0000000000
> --- a/elf/tst-libc_dlvsym-dso.c
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -/* Compare dlvsym and __libc_dlvsym results.  Shared object code.
> -   Copyright (C) 2017-2021 Free Software Foundation, Inc.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include "tst-libc_dlvsym.h"
> -
> -void
> -compare_vsyms_global (void)
> -{
> -  compare_vsyms ();
> -}

Ok.

> diff --git a/elf/tst-libc_dlvsym-static.c b/elf/tst-libc_dlvsym-static.c
> deleted file mode 100644
> index 19c438c3cd..0000000000
> --- a/elf/tst-libc_dlvsym-static.c
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -/* Compare dlvsym and __libc_dlvsym results.  Static version.
> -   Copyright (C) 2017-2021 Free Software Foundation, Inc.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include <support/xdlfcn.h>
> -
> -static int
> -do_test (void)
> -{
> -  void *handle = xdlopen ("tst-libc_dlvsym-dso.so", RTLD_LAZY);
> -  void (*compare) (void) = xdlsym (handle, "compare_vsyms_global");
> -  compare ();
> -  xdlclose (handle);
> -
> -  return 0;
> -}
> -
> -#include <support/test-driver.c>

Ok.

> diff --git a/elf/tst-libc_dlvsym.c b/elf/tst-libc_dlvsym.c
> deleted file mode 100644
> index 823643fb1c..0000000000
> --- a/elf/tst-libc_dlvsym.c
> +++ /dev/null
> @@ -1,34 +0,0 @@
> -/* Compare dlvsym and __libc_dlvsym results.  Dynamic version.
> -   Copyright (C) 2017-2021 Free Software Foundation, Inc.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -#include "tst-libc_dlvsym.h"
> -
> -static int
> -do_test (void)
> -{
> -  compare_vsyms ();
> -
> -  void *handle = xdlopen ("tst-libc_dlvsym-dso.so", RTLD_LAZY);
> -  void (*compare) (void) = xdlsym (handle, "compare_vsyms_global");
> -  compare ();
> -  xdlclose (handle);
> -
> -  return 0;
> -}
> -
> -#include <support/test-driver.c>

Ok.

> diff --git a/elf/tst-libc_dlvsym.h b/elf/tst-libc_dlvsym.h
> deleted file mode 100644
> index 1a8f2e9271..0000000000
> --- a/elf/tst-libc_dlvsym.h
> +++ /dev/null
> @@ -1,130 +0,0 @@
> -/* Compare dlvsym and __libc_dlvsym results.  Common code.
> -   Copyright (C) 2017-2021 Free Software Foundation, Inc.
> -   This file is part of the GNU C Library.
> -
> -   The GNU C Library is free software; you can redistribute it and/or
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <https://www.gnu.org/licenses/>.  */
> -
> -/* compare_vsyms is the main entry point for these tests.
> -
> -   Indirectly, It calls __libc_dlvsym (from libc.so; internal
> -   interface) and dlvsym (from libdl.so; public interface) to compare
> -   the results for a selected set of symbols in libc.so which
> -   typically have more than one symbol version.  The two functions are
> -   implemented by somewhat different code, and this test checks that
> -   their results are the same.
> -
> -   The versions are generated to range from GLIBC_2.0 to GLIBC_2.Y,
> -   with Y being the current __GLIBC_MINOR__ version plus two.  In
> -   addition, there is a list of special symbol versions of the form
> -   GLIBC_2.Y.Z, which were used for some releases.
> -
> -   Comparing the two dlvsym results at versions which do not actually
> -   exist does not test much, but it will not contribute to false test
> -   failures, either.  */
> -
> -#include <array_length.h>
> -#include <gnu/lib-names.h>
> -#include <stdbool.h>
> -#include <stdio.h>
> -#include <support/check.h>
> -#include <support/xdlfcn.h>
> -
> -/* Run consistency check for versioned symbol NAME@VERSION.  NB: We
> -   may execute in a shared object, so exit on error for proper error
> -   reporting.  */
> -static void
> -compare_vsyms_0 (void *libc_handle, const char *name, const char *version,
> -                 bool *pfound)
> -{
> -  void *dlvsym_address = dlvsym (libc_handle, name, version);
> -  void *libc_dlvsym_address
> -    = __libc_dlvsym (libc_handle, name, version);
> -  if (dlvsym_address != libc_dlvsym_address)
> -    FAIL_EXIT1 ("%s@%s mismatch: %p != %p",
> -                name, version, dlvsym_address, libc_dlvsym_address);
> -  if (dlvsym_address != NULL)
> -    *pfound = true;
> -}
> -
> -
> -/* Run consistency check for versioned symbol NAME at multiple symbol
> -   version.  */
> -static void
> -compare_vsyms_1 (void *libc_handle, const char *name)
> -{
> -  bool found = false;
> -
> -  /* Historic versions which do not follow the usual GLIBC_2.Y
> -     pattern, to increase test coverage.  Not all architectures have
> -     those, but probing additional versions does not hurt.  */
> -  static const char special_versions[][12] =
> -    {
> -      "GLIBC_2.1.1",
> -      "GLIBC_2.1.2",
> -      "GLIBC_2.1.3",
> -      "GLIBC_2.1.4",
> -      "GLIBC_2.2.1",
> -      "GLIBC_2.2.2",
> -      "GLIBC_2.2.3",
> -      "GLIBC_2.2.4",
> -      "GLIBC_2.2.5",
> -      "GLIBC_2.2.6",
> -      "GLIBC_2.3.2",
> -      "GLIBC_2.3.3",
> -      "GLIBC_2.3.4",
> -    };
> -  for (int i = 0; i < array_length (special_versions); ++i)
> -    compare_vsyms_0 (libc_handle, name, special_versions[i], &found);
> -
> -  /* Iterate to an out-of-range version, to cover some unused symbols
> -     as well.  */
> -  for (int minor_version = 0; minor_version <= __GLIBC_MINOR__ + 2;
> -       ++minor_version)
> -    {
> -      char version[30];
> -      snprintf (version, sizeof (version), "GLIBC_%d.%d",
> -                __GLIBC__, minor_version);
> -      compare_vsyms_0 (libc_handle, name, version, &found);
> -    }
> -
> -  if (!found)
> -    FAIL_EXIT1 ("symbol %s not found at any version", name);
> -}
> -
> -/* Run consistency checks for various symbols which usually have
> -   multiple versions.  */
> -static void
> -compare_vsyms (void)
> -{
> -  /* The minor version loop in compare_vsyms_1 needs updating in case
> -     we ever switch to glibc 3.0.  */
> -  if (__GLIBC__ != 2)
> -    FAIL_EXIT1 ("unexpected glibc major version: %d", __GLIBC__);
> -
> -  /* __libc_dlvsym does not recognize the special RTLD_* handles, so
> -     obtain an explicit handle for libc.so.  */
> -  void *libc_handle = xdlopen (LIBC_SO, RTLD_LAZY | RTLD_NOLOAD);
> -
> -
> -  /* sys_errlist and sys_siglist were deprecated in glibc 2.32 and they are
> -     not available on architectures with base ABI newer than 2.32.  */
> -#if TEST_COMPAT (libc, GLIBC_2_0, GLIBC_2_32)
> -  compare_vsyms_1 (libc_handle, "_sys_errlist");
> -  compare_vsyms_1 (libc_handle, "_sys_siglist");
> -#endif
> -  compare_vsyms_1 (libc_handle, "quick_exit");
> -
> -  xdlclose (libc_handle);
> -}

Ok.

> diff --git a/include/dlfcn.h b/include/dlfcn.h
> index d4440c567e..a4c283728f 100644
> --- a/include/dlfcn.h
> +++ b/include/dlfcn.h
> @@ -45,20 +45,20 @@ extern char **__libc_argv attribute_hidden;
>     better error handling semantics for the library.  */
>  #define __libc_dlopen(name) \
>    __libc_dlopen_mode (name, RTLD_NOW | __RTLD_DLOPEN)
> -extern void *__libc_dlopen_mode  (const char *__name, int __mode);
> -extern void *__libc_dlsym   (void *__map, const char *__name);
> -extern void *__libc_dlvsym (void *map, const char *name, const char *version);
> -extern int   __libc_dlclose (void *__map);
> -libc_hidden_proto (__libc_dlopen_mode)
> -libc_hidden_proto (__libc_dlsym)
> -libc_hidden_proto (__libc_dlvsym)
> -libc_hidden_proto (__libc_dlclose)
> +extern void *__libc_dlopen_mode  (const char *__name, int __mode)
> +  attribute_hidden;
> +extern void *__libc_dlsym   (void *__map, const char *__name)
> +  attribute_hidden;
> +extern void *__libc_dlvsym (void *map, const char *name, const char *version)
> +  attribute_hidden;
> +extern int   __libc_dlclose (void *__map)
> +  attribute_hidden;
>  
>  /* Locate shared object containing the given address.  */
>  #ifdef ElfW
>  extern int _dl_addr (const void *address, Dl_info *info,
> -		     struct link_map **mapp, const ElfW(Sym) **symbolp);
> -libc_hidden_proto (_dl_addr)
> +		     struct link_map **mapp, const ElfW(Sym) **symbolp)
> +  attribute_hidden;
>  #endif
>  
>  struct link_map;

Ok.

> @@ -73,23 +73,21 @@ extern void _dl_close_worker (struct link_map *map, bool force)
>  /* Look up NAME in shared object HANDLE (which may be RTLD_DEFAULT or
>     RTLD_NEXT).  WHO is the calling function, for RTLD_NEXT.  Returns
>     the symbol value, which may be NULL.  */
> -extern void *_dl_sym (void *handle, const char *name, void *who);
> -libc_hidden_proto (_dl_sym)
> +extern void *_dl_sym (void *handle, const char *name, void *who)
> +  attribute_hidden;
>  
>  /* Look up version VERSION of symbol NAME in shared object HANDLE
>     (which may be RTLD_DEFAULT or RTLD_NEXT).  WHO is the calling
>     function, for RTLD_NEXT.  Returns the symbol value, which may be
>     NULL.  */
>  extern void *_dl_vsym (void *handle, const char *name, const char *version,
> -		       void *who);
> -libc_hidden_proto (_dl_vsym)
> +		       void *who) attribute_hidden;
>  
>  /* Helper function for <dlfcn.h> functions.  Runs the OPERATE function via
>     _dl_catch_error.  Returns zero for success, nonzero for failure; and
>     arranges for `dlerror' to return the error details.
>     ARGS is passed as argument to OPERATE.  */
> -extern int _dlerror_run (void (*operate) (void *), void *args);
> -libc_hidden_proto (_dlerror_run)
> +extern int _dlerror_run (void (*operate) (void *), void *args) attribute_hidden;
>  
>  /* This structure is used to make the outer (statically linked)
>     implementation of dlopen and related functions to the inner libc
> 

Ok.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 4/4] elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols
  2021-07-06 19:30   ` Adhemerval Zanella
@ 2021-07-07  6:42     ` Florian Weimer
  0 siblings, 0 replies; 15+ messages in thread
From: Florian Weimer @ 2021-07-07  6:42 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: libc-alpha

* Adhemerval Zanella:

> On 06/07/2021 14:22, Florian Weimer via Libc-alpha wrote:
>> They are no longer needed after everything has been moved into
>> libc.  The _dl_vsym test has to be removed because the symbol
>> cannot be used outside libc anymore.
>
> Is the testing not failing because it is binding to GLIBC_PRIVATE?

The symbol under test (__libc_dlvsym) is no longer available for dynamic
linking.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/4] GLIBC_PRIVATE ABI cleanups
  2021-07-06 17:22 [PATCH 0/4] GLIBC_PRIVATE ABI cleanups Florian Weimer
                   ` (3 preceding siblings ...)
  2021-07-06 17:22 ` [PATCH 4/4] elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols Florian Weimer
@ 2021-07-07 10:56 ` Szabolcs Nagy
  2021-07-07 11:04   ` Florian Weimer
  4 siblings, 1 reply; 15+ messages in thread
From: Szabolcs Nagy @ 2021-07-07 10:56 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha

The 07/06/2021 19:22, Florian Weimer via Libc-alpha wrote:
> This is a follow-up due to the libc integration work.
> 
> I think using the libc locks is the right thing to do for now.  In the
> future, we might migrate nss_db and nss_hesiod to plain
> pthread_mutex_lock (no __ prefix) and use pthread_mutex_t in them.  For
> nss_files/nss_dns and without libc integration for them, there might be
> a minimal conformance issue here because there is (I think) a POSIX
> version which specifies NSS functions but not libpthread.
> 
> __pthread_mutex_lock, __pthread_mutex_unlock are currently used by rr; I
> filed at ticket explaining why I think they don't need to that for glibc
> 2.34 anymore:
> 
>   glibc 2.34 enablement around pthread mutex handling
>   <https://github.com/rr-debugger/rr/issues/2913>
> 
> We kept the GLIBC_2.34 symbol versions for those initially because we
> could not migrate all internal uses off a
> __pthread_mutex_lock@@GLIBC_PRIVATE symbol, and the external users would
> have bound to a GLIBC_PRIVATE symbol, so GLIBC_2.34 seemed the better
> choice.
> 
> Tested on i686-linux-gnu and x86_64-linux-gnu.  Built with
> build-many-glibcs.py.
> 
> Thanks,
> Florian
> 
> Florian Weimer (4):
>   nptl: Use internal low-level lock type for !IS_IN (libc)
>   nptl: Remove GLIBC_2.34 versions of __pthread_mutex_lock,
>     __pthread_mutex_unlock
>   nptl: Reduce the GLIBC_PRIVATE ABI
>   elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols

after these commits on arm i see

/usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(ypclnt.os): in function `__GI_yp_unbind':
/work/glibc-armhf-linux/build/glibc/nis/ypclnt.c:267: undefined reference to `__libc_do_syscall'
/usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(ypclnt.os): in function `__GI_yp_get_default_domain':
/work/glibc-armhf-linux/build/glibc/nis/ypclnt.c:415: undefined reference to `__libc_do_syscall'
/usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(ypclnt.os): in function `do_ypcall':
/work/glibc-armhf-linux/build/glibc/nis/ypclnt.c:332: undefined reference to `__libc_do_syscall'
/usr/bin/ld: /work/glibc-armhf-linux/build/glibc/nis/ypclnt.c:319: undefined reference to `__libc_do_syscall'
/usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(nis_call.os): in function `get_ckey':
/work/glibc-armhf-linux/build/glibc/nis/nis_call.c:177: undefined reference to `__libc_do_syscall'
/usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(nis_call.os):/work/glibc-armhf-linux/build/glibc/nis/nis_call.c:177: more undefined references to `__libc_do_syscall' follow
collect2: error: ld returned 1 exit status
make[2]: *** [../Makerules:536: /work/glibc-armhf-linux/build/build/nis/libnsl.so] Error 1
make[2]: Target 'others' not remade because of errors.
make[2]: Leaving directory '/work/glibc-armhf-linux/build/glibc/nis'
make[1]: *** [Makefile:478: nis/others] Error 2


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/4] GLIBC_PRIVATE ABI cleanups
  2021-07-07 10:56 ` [PATCH 0/4] GLIBC_PRIVATE ABI cleanups Szabolcs Nagy
@ 2021-07-07 11:04   ` Florian Weimer
  2021-07-07 11:53     ` Szabolcs Nagy
  0 siblings, 1 reply; 15+ messages in thread
From: Florian Weimer @ 2021-07-07 11:04 UTC (permalink / raw)
  To: Szabolcs Nagy; +Cc: libc-alpha

* Szabolcs Nagy:

>> Florian Weimer (4):
>>   nptl: Use internal low-level lock type for !IS_IN (libc)
>>   nptl: Remove GLIBC_2.34 versions of __pthread_mutex_lock,
>>     __pthread_mutex_unlock
>>   nptl: Reduce the GLIBC_PRIVATE ABI
>>   elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols
>
> after these commits on arm i see
>
> /usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(ypclnt.os): in function `__GI_yp_unbind':
> /work/glibc-armhf-linux/build/glibc/nis/ypclnt.c:267: undefined reference to `__libc_do_syscall'
> /usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(ypclnt.os): in function `__GI_yp_get_default_domain':
> /work/glibc-armhf-linux/build/glibc/nis/ypclnt.c:415: undefined reference to `__libc_do_syscall'
> /usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(ypclnt.os): in function `do_ypcall':
> /work/glibc-armhf-linux/build/glibc/nis/ypclnt.c:332: undefined reference to `__libc_do_syscall'
> /usr/bin/ld: /work/glibc-armhf-linux/build/glibc/nis/ypclnt.c:319: undefined reference to `__libc_do_syscall'
> /usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(nis_call.os): in function `get_ckey':
> /work/glibc-armhf-linux/build/glibc/nis/nis_call.c:177: undefined reference to `__libc_do_syscall'
> /usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(nis_call.os):/work/glibc-armhf-linux/build/glibc/nis/nis_call.c:177: more undefined references to `__libc_do_syscall' follow
> collect2: error: ld returned 1 exit status

I did build this on arm-linux-gnueabihf with build-many-glibcs.py, so
this is very surprising.  Looking at
sysdeps/unix/sysv/linux/arm/sysdep.h, I wonder if you are building in
thumb mode, and if so, why this isn't covered by build-many-glibcs.py.

Is the comment about the r7 register still accurate?

Thanks,
Florian


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/4] GLIBC_PRIVATE ABI cleanups
  2021-07-07 11:04   ` Florian Weimer
@ 2021-07-07 11:53     ` Szabolcs Nagy
  2021-07-07 12:44       ` Florian Weimer
  0 siblings, 1 reply; 15+ messages in thread
From: Szabolcs Nagy @ 2021-07-07 11:53 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha

The 07/07/2021 13:04, Florian Weimer wrote:
> * Szabolcs Nagy:
> >> Florian Weimer (4):
> >>   nptl: Use internal low-level lock type for !IS_IN (libc)
> >>   nptl: Remove GLIBC_2.34 versions of __pthread_mutex_lock,
> >>     __pthread_mutex_unlock
> >>   nptl: Reduce the GLIBC_PRIVATE ABI
> >>   elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols
> >
> > after these commits on arm i see
> >
> > /usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(ypclnt.os): in function `__GI_yp_unbind':
> > /work/glibc-armhf-linux/build/glibc/nis/ypclnt.c:267: undefined reference to `__libc_do_syscall'
> > /usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(ypclnt.os): in function `__GI_yp_get_default_domain':
> > /work/glibc-armhf-linux/build/glibc/nis/ypclnt.c:415: undefined reference to `__libc_do_syscall'
> > /usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(ypclnt.os): in function `do_ypcall':
> > /work/glibc-armhf-linux/build/glibc/nis/ypclnt.c:332: undefined reference to `__libc_do_syscall'
> > /usr/bin/ld: /work/glibc-armhf-linux/build/glibc/nis/ypclnt.c:319: undefined reference to `__libc_do_syscall'
> > /usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(nis_call.os): in function `get_ckey':
> > /work/glibc-armhf-linux/build/glibc/nis/nis_call.c:177: undefined reference to `__libc_do_syscall'
> > /usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(nis_call.os):/work/glibc-armhf-linux/build/glibc/nis/nis_call.c:177: more undefined references to `__libc_do_syscall' follow
> > collect2: error: ld returned 1 exit status
> 
> I did build this on arm-linux-gnueabihf with build-many-glibcs.py, so
> this is very surprising.  Looking at
> sysdeps/unix/sysv/linux/arm/sysdep.h, I wonder if you are building in
> thumb mode, and if so, why this isn't covered by build-many-glibcs.py.
> 
> Is the comment about the r7 register still accurate?

yes it seems the compiler defaults to thumb mode:
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/8/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 8.2.0-7ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-multilib --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 8.2.0 (Ubuntu 8.2.0-7ubuntu1)

and yes i think the comment about r7 is accurate
(the compiler won't allow using it) e.g. in thumb
mode musl uses inline asm like

 "mov %1,r7 ; mov r7,%2 ; svc 0 ; mov r7,%1"


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/4] GLIBC_PRIVATE ABI cleanups
  2021-07-07 11:53     ` Szabolcs Nagy
@ 2021-07-07 12:44       ` Florian Weimer
  2021-07-07 12:53         ` Szabolcs Nagy
  0 siblings, 1 reply; 15+ messages in thread
From: Florian Weimer @ 2021-07-07 12:44 UTC (permalink / raw)
  To: Szabolcs Nagy; +Cc: libc-alpha

* Szabolcs Nagy:

> The 07/07/2021 13:04, Florian Weimer wrote:
>> * Szabolcs Nagy:
>> >> Florian Weimer (4):
>> >>   nptl: Use internal low-level lock type for !IS_IN (libc)
>> >>   nptl: Remove GLIBC_2.34 versions of __pthread_mutex_lock,
>> >>     __pthread_mutex_unlock
>> >>   nptl: Reduce the GLIBC_PRIVATE ABI
>> >>   elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols
>> >
>> > after these commits on arm i see
>> >
>> > /usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(ypclnt.os): in function `__GI_yp_unbind':
>> > /work/glibc-armhf-linux/build/glibc/nis/ypclnt.c:267: undefined reference to `__libc_do_syscall'
>> > /usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(ypclnt.os): in function `__GI_yp_get_default_domain':
>> > /work/glibc-armhf-linux/build/glibc/nis/ypclnt.c:415: undefined reference to `__libc_do_syscall'
>> > /usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(ypclnt.os): in function `do_ypcall':
>> > /work/glibc-armhf-linux/build/glibc/nis/ypclnt.c:332: undefined reference to `__libc_do_syscall'
>> > /usr/bin/ld: /work/glibc-armhf-linux/build/glibc/nis/ypclnt.c:319: undefined reference to `__libc_do_syscall'
>> > /usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(nis_call.os): in function `get_ckey':
>> > /work/glibc-armhf-linux/build/glibc/nis/nis_call.c:177: undefined reference to `__libc_do_syscall'
>> > /usr/bin/ld: /work/glibc-armhf-linux/build/build/nis/libnsl_pic.a(nis_call.os):/work/glibc-armhf-linux/build/glibc/nis/nis_call.c:177: more undefined references to `__libc_do_syscall' follow
>> > collect2: error: ld returned 1 exit status
>> 
>> I did build this on arm-linux-gnueabihf with build-many-glibcs.py, so
>> this is very surprising.  Looking at
>> sysdeps/unix/sysv/linux/arm/sysdep.h, I wonder if you are building in
>> thumb mode, and if so, why this isn't covered by build-many-glibcs.py.
>> 
>> Is the comment about the r7 register still accurate?
>
> yes it seems the compiler defaults to thumb mode:

How would one select that in a glibc build?  Configure with
CC="gcc -mthumb" CXX="g++ -mthumb"?

If yes, then we should change at least one of the Arm targets to use
that.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/4] GLIBC_PRIVATE ABI cleanups
  2021-07-07 12:44       ` Florian Weimer
@ 2021-07-07 12:53         ` Szabolcs Nagy
  0 siblings, 0 replies; 15+ messages in thread
From: Szabolcs Nagy @ 2021-07-07 12:53 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha

The 07/07/2021 14:44, Florian Weimer wrote:
> * Szabolcs Nagy:
> > yes it seems the compiler defaults to thumb mode:
> 
> How would one select that in a glibc build?  Configure with
> CC="gcc -mthumb" CXX="g++ -mthumb"?
> 
> If yes, then we should change at least one of the Arm targets to use
> that.

yes that makes sense. adding -mthumb to CC should work.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-07-07 12:54 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 17:22 [PATCH 0/4] GLIBC_PRIVATE ABI cleanups Florian Weimer
2021-07-06 17:22 ` [PATCH 1/4] nptl: Use internal low-level lock type for !IS_IN (libc) Florian Weimer
2021-07-06 19:24   ` Adhemerval Zanella
2021-07-06 17:22 ` [PATCH 2/4] nptl: Remove GLIBC_2.34 versions of __pthread_mutex_lock, __pthread_mutex_unlock Florian Weimer
2021-07-06 19:25   ` Adhemerval Zanella
2021-07-06 17:22 ` [PATCH 3/4] nptl: Reduce the GLIBC_PRIVATE ABI Florian Weimer
2021-07-06 19:26   ` Adhemerval Zanella
2021-07-06 17:22 ` [PATCH 4/4] elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols Florian Weimer
2021-07-06 19:30   ` Adhemerval Zanella
2021-07-07  6:42     ` Florian Weimer
2021-07-07 10:56 ` [PATCH 0/4] GLIBC_PRIVATE ABI cleanups Szabolcs Nagy
2021-07-07 11:04   ` Florian Weimer
2021-07-07 11:53     ` Szabolcs Nagy
2021-07-07 12:44       ` Florian Weimer
2021-07-07 12:53         ` Szabolcs Nagy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).