[PATCH 0/4] GLIBC_PRIVATE ABI cleanups

Florian Weimer fweimer@redhat.com
Tue Jul 6 17:22:01 GMT 2021


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



More information about the Libc-alpha mailing list