[13/30] nptl: Remove open from libpthread

Message ID 20210316200510.2135405-14-adhemerval.zanella@linaro.org
State New
Headers show
Series
  • libpthread removal: pthread-compat-wrappers and other libc symbols
Related show

Commit Message

Michael Hudson-Doyle via Libc-alpha March 16, 2021, 8:04 p.m.
The libc version is identical and built with same flags.  The libpthread
version are also newer than libc, so they are make the default symbol
for newer binaries.

Checked on x86_64-linux-gnu.
---
 nptl/Makefile                                         |  4 +---
 nptl/Versions                                         |  4 ----
 sysdeps/pthread/sem_open.c                            |  2 +-
 sysdeps/unix/sysv/linux/aarch64/libpthread.abilist    |  4 ----
 sysdeps/unix/sysv/linux/alpha/libc.abilist            |  1 +
 sysdeps/unix/sysv/linux/alpha/libpthread.abilist      |  4 ----
 sysdeps/unix/sysv/linux/arc/libpthread.abilist        |  4 ----
 sysdeps/unix/sysv/linux/arm/be/libpthread.abilist     |  4 ----
 sysdeps/unix/sysv/linux/arm/le/libpthread.abilist     |  4 ----
 sysdeps/unix/sysv/linux/csky/libpthread.abilist       |  4 ----
 sysdeps/unix/sysv/linux/hppa/libpthread.abilist       |  4 ----
 sysdeps/unix/sysv/linux/i386/libc.abilist             |  1 +
 sysdeps/unix/sysv/linux/i386/libpthread.abilist       |  4 ----
 sysdeps/unix/sysv/linux/ia64/libpthread.abilist       |  4 ----
 .../unix/sysv/linux/m68k/coldfire/libpthread.abilist  |  4 ----
 sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist      |  1 +
 .../unix/sysv/linux/m68k/m680x0/libpthread.abilist    |  4 ----
 .../unix/sysv/linux/microblaze/be/libpthread.abilist  |  4 ----
 .../unix/sysv/linux/microblaze/le/libpthread.abilist  |  4 ----
 .../unix/sysv/linux/mips/mips32/libpthread.abilist    |  4 ----
 .../unix/sysv/linux/mips/mips64/libpthread.abilist    |  4 ----
 sysdeps/unix/sysv/linux/nios2/libpthread.abilist      |  4 ----
 sysdeps/unix/sysv/linux/open64.c                      | 11 +++++++++--
 .../sysv/linux/powerpc/powerpc32/fpu/libc.abilist     |  1 +
 .../sysv/linux/powerpc/powerpc32/libpthread.abilist   |  4 ----
 .../sysv/linux/powerpc/powerpc32/nofpu/libc.abilist   |  1 +
 .../linux/powerpc/powerpc64/be/libpthread.abilist     |  4 ----
 .../linux/powerpc/powerpc64/le/libpthread.abilist     |  4 ----
 sysdeps/unix/sysv/linux/riscv/rv32/libpthread.abilist |  4 ----
 sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist |  4 ----
 sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist     |  1 +
 .../unix/sysv/linux/s390/s390-32/libpthread.abilist   |  4 ----
 .../unix/sysv/linux/s390/s390-64/libpthread.abilist   |  4 ----
 sysdeps/unix/sysv/linux/sh/be/libpthread.abilist      |  4 ----
 sysdeps/unix/sysv/linux/sh/le/libpthread.abilist      |  4 ----
 sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist    |  1 +
 .../unix/sysv/linux/sparc/sparc32/libpthread.abilist  |  4 ----
 .../unix/sysv/linux/sparc/sparc64/libpthread.abilist  |  4 ----
 sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist  |  4 ----
 sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist |  4 ----
 40 files changed, 18 insertions(+), 126 deletions(-)

-- 
2.25.1

Comments

Michael Hudson-Doyle via Libc-alpha March 17, 2021, 8:11 p.m. | #1
* Adhemerval Zanella via Libc-alpha:

> diff --git a/sysdeps/unix/sysv/linux/open64.c b/sysdeps/unix/sysv/linux/open64.c

> index 98db26f501..860b5607ff 100644

> --- a/sysdeps/unix/sysv/linux/open64.c

> +++ b/sysdeps/unix/sysv/linux/open64.c

> @@ -20,8 +20,8 @@

>  #include <sys/stat.h>

>  #include <fcntl.h>

>  #include <stdarg.h>

> -

>  #include <sysdep-cancel.h>

> +#include <shlib-compat.h>

>  

>  

>  #ifdef __OFF_T_MATCHES_OFF64_T

> @@ -51,7 +51,6 @@ __libc_open64 (const char *file, int oflag, ...)

>  

>  strong_alias (__libc_open64, __open64)

>  libc_hidden_weak (__open64)

> -weak_alias (__libc_open64, open64)

>  

>  #ifdef __OFF_T_MATCHES_OFF64_T

>  strong_alias (__libc_open64, __libc_open)

> @@ -59,3 +58,11 @@ strong_alias (__libc_open64, __open)

>  libc_hidden_weak (__open)

>  weak_alias (__libc_open64, open)

>  #endif

> +

> +#if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_2)

> +strong_alias (__libc_open64, __compat_open64)

> +compat_symbol (libc, __compat_open64, open64, GLIBC_2_1);

> +versioned_symbol (libc, __libc_open64, open64, GLIBC_2_2);

> +#else

> +weak_alias (__libc_open64, open64)

> +#endif


Please make open64@GLIBC_2.2 a compat symbol on the architectures that
have it.  This way, we don't have to add open64@GLIBC_2.34.

Thanks,
Florian

Patch

diff --git a/nptl/Makefile b/nptl/Makefile
index b2d6126bc2..3398607df7 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -81,7 +81,7 @@  static-only-routines = pthread_atfork
 # We need to provide certain routines for compatibility with existing
 # binaries.
 pthread-compat-wrappers = \
-		      open open64 pause \
+		      pause \
 		      pread pread64 pwrite pwrite64 \
 		      tcdrain msgrcv msgsnd \
 		      sigwait sigsuspend \
@@ -293,8 +293,6 @@  CFLAGS-sigwait.c += -fexceptions -fasynchronous-unwind-tables
 CFLAGS-msgrcv.c += -fexceptions -fasynchronous-unwind-tables
 CFLAGS-msgsnd.c += -fexceptions -fasynchronous-unwind-tables
 CFLAGS-tcdrain.c += -fexceptions -fasynchronous-unwind-tables
-CFLAGS-open.c += -fexceptions -fasynchronous-unwind-tables
-CFLAGS-open64.c += -fexceptions -fasynchronous-unwind-tables
 CFLAGS-pause.c += -fexceptions -fasynchronous-unwind-tables
 CFLAGS-recvmsg.c += -fexceptions -fasynchronous-unwind-tables
 CFLAGS-sendmsg.c += -fexceptions -fasynchronous-unwind-tables
diff --git a/nptl/Versions b/nptl/Versions
index 2ab0f85df1..8c52860828 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -106,7 +106,6 @@  libpthread {
     __errno_location;
     __fcntl;
     __h_errno_location;
-    __open;
     __pthread_atfork;
     __pthread_getspecific;
     __pthread_key_create;
@@ -131,7 +130,6 @@  libpthread {
     ftrylockfile;
     funlockfile;
     longjmp;
-    open;
     pause;
     pthread_atfork;
     pthread_cancel;
@@ -226,7 +224,6 @@  libpthread {
   }
 
   GLIBC_2.2 {
-    __open64;
     __pread64;
     __pthread_rwlock_destroy;
     __pthread_rwlock_init;
@@ -237,7 +234,6 @@  libpthread {
     __pthread_rwlock_wrlock;
     __pwrite64;
     __res_state;
-    open64;
     pread64;
     pread;
     pthread_attr_getstack;
diff --git a/sysdeps/pthread/sem_open.c b/sysdeps/pthread/sem_open.c
index 9755be70ee..a91df5ac93 100644
--- a/sysdeps/pthread/sem_open.c
+++ b/sysdeps/pthread/sem_open.c
@@ -59,7 +59,7 @@  sem_open (const char *name, int oflag, ...)
   if ((oflag & O_CREAT) == 0 || (oflag & O_EXCL) == 0)
     {
     try_again:
-      fd = __libc_open (dirname.name,
+      fd = open (dirname.name,
 			(oflag & ~(O_CREAT|O_ACCMODE)) | O_NOFOLLOW | O_RDWR);
 
       if (fd == -1)
diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
index 9f26a5dc41..d398a424d1 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
@@ -7,8 +7,6 @@  GLIBC_2.17 __h_errno_location F
 GLIBC_2.17 __libc_allocate_rtsig F
 GLIBC_2.17 __libc_current_sigrtmax F
 GLIBC_2.17 __libc_current_sigrtmin F
-GLIBC_2.17 __open F
-GLIBC_2.17 __open64 F
 GLIBC_2.17 __pread64 F
 GLIBC_2.17 __pthread_cleanup_routine F
 GLIBC_2.17 __pthread_getspecific F
@@ -47,8 +45,6 @@  GLIBC_2.17 flockfile F
 GLIBC_2.17 ftrylockfile F
 GLIBC_2.17 funlockfile F
 GLIBC_2.17 longjmp F
-GLIBC_2.17 open F
-GLIBC_2.17 open64 F
 GLIBC_2.17 pause F
 GLIBC_2.17 pread F
 GLIBC_2.17 pread64 F
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index ec7a5a47f2..ef49b96bf8 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -1906,6 +1906,7 @@  GLIBC_2.2 mkstemp64 F
 GLIBC_2.2 moncontrol F
 GLIBC_2.2 msgctl F
 GLIBC_2.2 ngettext F
+GLIBC_2.2 open64 F
 GLIBC_2.2 posix_fadvise F
 GLIBC_2.2 posix_fadvise64 F
 GLIBC_2.2 posix_fallocate F
diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
index 9b68d0c9e7..db0e35fccd 100644
--- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
@@ -4,7 +4,6 @@  GLIBC_2.0 _IO_funlockfile F
 GLIBC_2.0 __errno_location F
 GLIBC_2.0 __fcntl F
 GLIBC_2.0 __h_errno_location F
-GLIBC_2.0 __open F
 GLIBC_2.0 __pthread_getspecific F
 GLIBC_2.0 __pthread_key_create F
 GLIBC_2.0 __pthread_mutex_destroy F
@@ -27,7 +26,6 @@  GLIBC_2.0 flockfile F
 GLIBC_2.0 ftrylockfile F
 GLIBC_2.0 funlockfile F
 GLIBC_2.0 longjmp F
-GLIBC_2.0 open F
 GLIBC_2.0 pause F
 GLIBC_2.0 pthread_atfork F
 GLIBC_2.0 pthread_cancel F
@@ -117,7 +115,6 @@  GLIBC_2.12 pthread_mutexattr_setrobust F
 GLIBC_2.12 pthread_setname_np F
 GLIBC_2.18 pthread_getattr_default_np F
 GLIBC_2.18 pthread_setattr_default_np F
-GLIBC_2.2 __open64 F
 GLIBC_2.2 __pread64 F
 GLIBC_2.2 __pthread_rwlock_destroy F
 GLIBC_2.2 __pthread_rwlock_init F
@@ -128,7 +125,6 @@  GLIBC_2.2 __pthread_rwlock_unlock F
 GLIBC_2.2 __pthread_rwlock_wrlock F
 GLIBC_2.2 __pwrite64 F
 GLIBC_2.2 __res_state F
-GLIBC_2.2 open64 F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
 GLIBC_2.2 pthread_attr_getstack F
diff --git a/sysdeps/unix/sysv/linux/arc/libpthread.abilist b/sysdeps/unix/sysv/linux/arc/libpthread.abilist
index 77ce83fbbe..9900a16905 100644
--- a/sysdeps/unix/sysv/linux/arc/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/arc/libpthread.abilist
@@ -6,8 +6,6 @@  GLIBC_2.32 __h_errno_location F
 GLIBC_2.32 __libc_allocate_rtsig F
 GLIBC_2.32 __libc_current_sigrtmax F
 GLIBC_2.32 __libc_current_sigrtmin F
-GLIBC_2.32 __open F
-GLIBC_2.32 __open64 F
 GLIBC_2.32 __pread64 F
 GLIBC_2.32 __pthread_cleanup_routine F
 GLIBC_2.32 __pthread_getspecific F
@@ -57,8 +55,6 @@  GLIBC_2.32 mtx_lock F
 GLIBC_2.32 mtx_timedlock F
 GLIBC_2.32 mtx_trylock F
 GLIBC_2.32 mtx_unlock F
-GLIBC_2.32 open F
-GLIBC_2.32 open64 F
 GLIBC_2.32 pause F
 GLIBC_2.32 pread F
 GLIBC_2.32 pread64 F
diff --git a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist
index eb55c262cc..01f415c924 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist
@@ -42,8 +42,6 @@  GLIBC_2.4 __h_errno_location F
 GLIBC_2.4 __libc_allocate_rtsig F
 GLIBC_2.4 __libc_current_sigrtmax F
 GLIBC_2.4 __libc_current_sigrtmin F
-GLIBC_2.4 __open F
-GLIBC_2.4 __open64 F
 GLIBC_2.4 __pread64 F
 GLIBC_2.4 __pthread_cleanup_routine F
 GLIBC_2.4 __pthread_getspecific F
@@ -82,8 +80,6 @@  GLIBC_2.4 flockfile F
 GLIBC_2.4 ftrylockfile F
 GLIBC_2.4 funlockfile F
 GLIBC_2.4 longjmp F
-GLIBC_2.4 open F
-GLIBC_2.4 open64 F
 GLIBC_2.4 pause F
 GLIBC_2.4 pread F
 GLIBC_2.4 pread64 F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist
index eb55c262cc..01f415c924 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist
@@ -42,8 +42,6 @@  GLIBC_2.4 __h_errno_location F
 GLIBC_2.4 __libc_allocate_rtsig F
 GLIBC_2.4 __libc_current_sigrtmax F
 GLIBC_2.4 __libc_current_sigrtmin F
-GLIBC_2.4 __open F
-GLIBC_2.4 __open64 F
 GLIBC_2.4 __pread64 F
 GLIBC_2.4 __pthread_cleanup_routine F
 GLIBC_2.4 __pthread_getspecific F
@@ -82,8 +80,6 @@  GLIBC_2.4 flockfile F
 GLIBC_2.4 ftrylockfile F
 GLIBC_2.4 funlockfile F
 GLIBC_2.4 longjmp F
-GLIBC_2.4 open F
-GLIBC_2.4 open64 F
 GLIBC_2.4 pause F
 GLIBC_2.4 pread F
 GLIBC_2.4 pread64 F
diff --git a/sysdeps/unix/sysv/linux/csky/libpthread.abilist b/sysdeps/unix/sysv/linux/csky/libpthread.abilist
index d6f4f8419e..affb147f3a 100644
--- a/sysdeps/unix/sysv/linux/csky/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libpthread.abilist
@@ -6,8 +6,6 @@  GLIBC_2.29 __h_errno_location F
 GLIBC_2.29 __libc_allocate_rtsig F
 GLIBC_2.29 __libc_current_sigrtmax F
 GLIBC_2.29 __libc_current_sigrtmin F
-GLIBC_2.29 __open F
-GLIBC_2.29 __open64 F
 GLIBC_2.29 __pread64 F
 GLIBC_2.29 __pthread_cleanup_routine F
 GLIBC_2.29 __pthread_getspecific F
@@ -57,8 +55,6 @@  GLIBC_2.29 mtx_lock F
 GLIBC_2.29 mtx_timedlock F
 GLIBC_2.29 mtx_trylock F
 GLIBC_2.29 mtx_unlock F
-GLIBC_2.29 open F
-GLIBC_2.29 open64 F
 GLIBC_2.29 pause F
 GLIBC_2.29 pread F
 GLIBC_2.29 pread64 F
diff --git a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
index 6208e93259..bd9ca34250 100644
--- a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
@@ -15,8 +15,6 @@  GLIBC_2.2 __h_errno_location F
 GLIBC_2.2 __libc_allocate_rtsig F
 GLIBC_2.2 __libc_current_sigrtmax F
 GLIBC_2.2 __libc_current_sigrtmin F
-GLIBC_2.2 __open F
-GLIBC_2.2 __open64 F
 GLIBC_2.2 __pread64 F
 GLIBC_2.2 __pthread_getspecific F
 GLIBC_2.2 __pthread_key_create F
@@ -49,8 +47,6 @@  GLIBC_2.2 flockfile F
 GLIBC_2.2 ftrylockfile F
 GLIBC_2.2 funlockfile F
 GLIBC_2.2 longjmp F
-GLIBC_2.2 open F
-GLIBC_2.2 open64 F
 GLIBC_2.2 pause F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index 4249ffd53c..759e488238 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -1915,6 +1915,7 @@  GLIBC_2.2 mkstemp64 F
 GLIBC_2.2 moncontrol F
 GLIBC_2.2 msgctl F
 GLIBC_2.2 ngettext F
+GLIBC_2.2 open64 F
 GLIBC_2.2 posix_fadvise F
 GLIBC_2.2 posix_fadvise64 F
 GLIBC_2.2 posix_fallocate F
diff --git a/sysdeps/unix/sysv/linux/i386/libpthread.abilist b/sysdeps/unix/sysv/linux/i386/libpthread.abilist
index 5e41c10d84..6d03e4fdf8 100644
--- a/sysdeps/unix/sysv/linux/i386/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libpthread.abilist
@@ -4,7 +4,6 @@  GLIBC_2.0 _IO_funlockfile F
 GLIBC_2.0 __errno_location F
 GLIBC_2.0 __fcntl F
 GLIBC_2.0 __h_errno_location F
-GLIBC_2.0 __open F
 GLIBC_2.0 __pthread_getspecific F
 GLIBC_2.0 __pthread_key_create F
 GLIBC_2.0 __pthread_mutex_destroy F
@@ -27,7 +26,6 @@  GLIBC_2.0 flockfile F
 GLIBC_2.0 ftrylockfile F
 GLIBC_2.0 funlockfile F
 GLIBC_2.0 longjmp F
-GLIBC_2.0 open F
 GLIBC_2.0 pause F
 GLIBC_2.0 pthread_atfork F
 GLIBC_2.0 pthread_cancel F
@@ -117,7 +115,6 @@  GLIBC_2.12 pthread_mutexattr_setrobust F
 GLIBC_2.12 pthread_setname_np F
 GLIBC_2.18 pthread_getattr_default_np F
 GLIBC_2.18 pthread_setattr_default_np F
-GLIBC_2.2 __open64 F
 GLIBC_2.2 __pread64 F
 GLIBC_2.2 __pthread_rwlock_destroy F
 GLIBC_2.2 __pthread_rwlock_init F
@@ -128,7 +125,6 @@  GLIBC_2.2 __pthread_rwlock_unlock F
 GLIBC_2.2 __pthread_rwlock_wrlock F
 GLIBC_2.2 __pwrite64 F
 GLIBC_2.2 __res_state F
-GLIBC_2.2 open64 F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
 GLIBC_2.2 pthread_attr_getstack F
diff --git a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
index 4d2ec9b1f2..f8e9c078cb 100644
--- a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
@@ -15,8 +15,6 @@  GLIBC_2.2 __h_errno_location F
 GLIBC_2.2 __libc_allocate_rtsig F
 GLIBC_2.2 __libc_current_sigrtmax F
 GLIBC_2.2 __libc_current_sigrtmin F
-GLIBC_2.2 __open F
-GLIBC_2.2 __open64 F
 GLIBC_2.2 __pread64 F
 GLIBC_2.2 __pthread_getspecific F
 GLIBC_2.2 __pthread_key_create F
@@ -49,8 +47,6 @@  GLIBC_2.2 flockfile F
 GLIBC_2.2 ftrylockfile F
 GLIBC_2.2 funlockfile F
 GLIBC_2.2 longjmp F
-GLIBC_2.2 open F
-GLIBC_2.2 open64 F
 GLIBC_2.2 pause F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
index eb55c262cc..01f415c924 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
@@ -42,8 +42,6 @@  GLIBC_2.4 __h_errno_location F
 GLIBC_2.4 __libc_allocate_rtsig F
 GLIBC_2.4 __libc_current_sigrtmax F
 GLIBC_2.4 __libc_current_sigrtmin F
-GLIBC_2.4 __open F
-GLIBC_2.4 __open64 F
 GLIBC_2.4 __pread64 F
 GLIBC_2.4 __pthread_cleanup_routine F
 GLIBC_2.4 __pthread_getspecific F
@@ -82,8 +80,6 @@  GLIBC_2.4 flockfile F
 GLIBC_2.4 ftrylockfile F
 GLIBC_2.4 funlockfile F
 GLIBC_2.4 longjmp F
-GLIBC_2.4 open F
-GLIBC_2.4 open64 F
 GLIBC_2.4 pause F
 GLIBC_2.4 pread F
 GLIBC_2.4 pread64 F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index c1eaa57190..9f6b0adeaf 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -1871,6 +1871,7 @@  GLIBC_2.2 mkstemp64 F
 GLIBC_2.2 moncontrol F
 GLIBC_2.2 msgctl F
 GLIBC_2.2 ngettext F
+GLIBC_2.2 open64 F
 GLIBC_2.2 posix_fadvise F
 GLIBC_2.2 posix_fadvise64 F
 GLIBC_2.2 posix_fallocate F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
index 5e41c10d84..6d03e4fdf8 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
@@ -4,7 +4,6 @@  GLIBC_2.0 _IO_funlockfile F
 GLIBC_2.0 __errno_location F
 GLIBC_2.0 __fcntl F
 GLIBC_2.0 __h_errno_location F
-GLIBC_2.0 __open F
 GLIBC_2.0 __pthread_getspecific F
 GLIBC_2.0 __pthread_key_create F
 GLIBC_2.0 __pthread_mutex_destroy F
@@ -27,7 +26,6 @@  GLIBC_2.0 flockfile F
 GLIBC_2.0 ftrylockfile F
 GLIBC_2.0 funlockfile F
 GLIBC_2.0 longjmp F
-GLIBC_2.0 open F
 GLIBC_2.0 pause F
 GLIBC_2.0 pthread_atfork F
 GLIBC_2.0 pthread_cancel F
@@ -117,7 +115,6 @@  GLIBC_2.12 pthread_mutexattr_setrobust F
 GLIBC_2.12 pthread_setname_np F
 GLIBC_2.18 pthread_getattr_default_np F
 GLIBC_2.18 pthread_setattr_default_np F
-GLIBC_2.2 __open64 F
 GLIBC_2.2 __pread64 F
 GLIBC_2.2 __pthread_rwlock_destroy F
 GLIBC_2.2 __pthread_rwlock_init F
@@ -128,7 +125,6 @@  GLIBC_2.2 __pthread_rwlock_unlock F
 GLIBC_2.2 __pthread_rwlock_wrlock F
 GLIBC_2.2 __pwrite64 F
 GLIBC_2.2 __res_state F
-GLIBC_2.2 open64 F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
 GLIBC_2.2 pthread_attr_getstack F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist
index ccbfadbb66..7ab306e08a 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist
@@ -7,8 +7,6 @@  GLIBC_2.18 __h_errno_location F
 GLIBC_2.18 __libc_allocate_rtsig F
 GLIBC_2.18 __libc_current_sigrtmax F
 GLIBC_2.18 __libc_current_sigrtmin F
-GLIBC_2.18 __open F
-GLIBC_2.18 __open64 F
 GLIBC_2.18 __pread64 F
 GLIBC_2.18 __pthread_cleanup_routine F
 GLIBC_2.18 __pthread_getspecific F
@@ -47,8 +45,6 @@  GLIBC_2.18 flockfile F
 GLIBC_2.18 ftrylockfile F
 GLIBC_2.18 funlockfile F
 GLIBC_2.18 longjmp F
-GLIBC_2.18 open F
-GLIBC_2.18 open64 F
 GLIBC_2.18 pause F
 GLIBC_2.18 pread F
 GLIBC_2.18 pread64 F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist
index ccbfadbb66..7ab306e08a 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist
@@ -7,8 +7,6 @@  GLIBC_2.18 __h_errno_location F
 GLIBC_2.18 __libc_allocate_rtsig F
 GLIBC_2.18 __libc_current_sigrtmax F
 GLIBC_2.18 __libc_current_sigrtmin F
-GLIBC_2.18 __open F
-GLIBC_2.18 __open64 F
 GLIBC_2.18 __pread64 F
 GLIBC_2.18 __pthread_cleanup_routine F
 GLIBC_2.18 __pthread_getspecific F
@@ -47,8 +45,6 @@  GLIBC_2.18 flockfile F
 GLIBC_2.18 ftrylockfile F
 GLIBC_2.18 funlockfile F
 GLIBC_2.18 longjmp F
-GLIBC_2.18 open F
-GLIBC_2.18 open64 F
 GLIBC_2.18 pause F
 GLIBC_2.18 pread F
 GLIBC_2.18 pread64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
index 0245dc1b1e..f2ca2bb187 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
@@ -4,7 +4,6 @@  GLIBC_2.0 _IO_funlockfile F
 GLIBC_2.0 __errno_location F
 GLIBC_2.0 __fcntl F
 GLIBC_2.0 __h_errno_location F
-GLIBC_2.0 __open F
 GLIBC_2.0 __pthread_getspecific F
 GLIBC_2.0 __pthread_key_create F
 GLIBC_2.0 __pthread_mutex_destroy F
@@ -27,7 +26,6 @@  GLIBC_2.0 flockfile F
 GLIBC_2.0 ftrylockfile F
 GLIBC_2.0 funlockfile F
 GLIBC_2.0 longjmp F
-GLIBC_2.0 open F
 GLIBC_2.0 pause F
 GLIBC_2.0 pthread_atfork F
 GLIBC_2.0 pthread_cancel F
@@ -83,7 +81,6 @@  GLIBC_2.18 pthread_setattr_default_np F
 GLIBC_2.2 __libc_allocate_rtsig F
 GLIBC_2.2 __libc_current_sigrtmax F
 GLIBC_2.2 __libc_current_sigrtmin F
-GLIBC_2.2 __open64 F
 GLIBC_2.2 __pread64 F
 GLIBC_2.2 __pthread_rwlock_destroy F
 GLIBC_2.2 __pthread_rwlock_init F
@@ -94,7 +91,6 @@  GLIBC_2.2 __pthread_rwlock_unlock F
 GLIBC_2.2 __pthread_rwlock_wrlock F
 GLIBC_2.2 __pwrite64 F
 GLIBC_2.2 __res_state F
-GLIBC_2.2 open64 F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
 GLIBC_2.2 pthread_attr_getguardsize F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
index 0245dc1b1e..f2ca2bb187 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
@@ -4,7 +4,6 @@  GLIBC_2.0 _IO_funlockfile F
 GLIBC_2.0 __errno_location F
 GLIBC_2.0 __fcntl F
 GLIBC_2.0 __h_errno_location F
-GLIBC_2.0 __open F
 GLIBC_2.0 __pthread_getspecific F
 GLIBC_2.0 __pthread_key_create F
 GLIBC_2.0 __pthread_mutex_destroy F
@@ -27,7 +26,6 @@  GLIBC_2.0 flockfile F
 GLIBC_2.0 ftrylockfile F
 GLIBC_2.0 funlockfile F
 GLIBC_2.0 longjmp F
-GLIBC_2.0 open F
 GLIBC_2.0 pause F
 GLIBC_2.0 pthread_atfork F
 GLIBC_2.0 pthread_cancel F
@@ -83,7 +81,6 @@  GLIBC_2.18 pthread_setattr_default_np F
 GLIBC_2.2 __libc_allocate_rtsig F
 GLIBC_2.2 __libc_current_sigrtmax F
 GLIBC_2.2 __libc_current_sigrtmin F
-GLIBC_2.2 __open64 F
 GLIBC_2.2 __pread64 F
 GLIBC_2.2 __pthread_rwlock_destroy F
 GLIBC_2.2 __pthread_rwlock_init F
@@ -94,7 +91,6 @@  GLIBC_2.2 __pthread_rwlock_unlock F
 GLIBC_2.2 __pthread_rwlock_wrlock F
 GLIBC_2.2 __pwrite64 F
 GLIBC_2.2 __res_state F
-GLIBC_2.2 open64 F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
 GLIBC_2.2 pthread_attr_getguardsize F
diff --git a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
index 69c2f8a500..e82220d6ae 100644
--- a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
@@ -7,8 +7,6 @@  GLIBC_2.21 __h_errno_location F
 GLIBC_2.21 __libc_allocate_rtsig F
 GLIBC_2.21 __libc_current_sigrtmax F
 GLIBC_2.21 __libc_current_sigrtmin F
-GLIBC_2.21 __open F
-GLIBC_2.21 __open64 F
 GLIBC_2.21 __pread64 F
 GLIBC_2.21 __pthread_cleanup_routine F
 GLIBC_2.21 __pthread_getspecific F
@@ -47,8 +45,6 @@  GLIBC_2.21 flockfile F
 GLIBC_2.21 ftrylockfile F
 GLIBC_2.21 funlockfile F
 GLIBC_2.21 longjmp F
-GLIBC_2.21 open F
-GLIBC_2.21 open64 F
 GLIBC_2.21 pause F
 GLIBC_2.21 pread F
 GLIBC_2.21 pread64 F
diff --git a/sysdeps/unix/sysv/linux/open64.c b/sysdeps/unix/sysv/linux/open64.c
index 98db26f501..860b5607ff 100644
--- a/sysdeps/unix/sysv/linux/open64.c
+++ b/sysdeps/unix/sysv/linux/open64.c
@@ -20,8 +20,8 @@ 
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <stdarg.h>
-
 #include <sysdep-cancel.h>
+#include <shlib-compat.h>
 
 
 #ifdef __OFF_T_MATCHES_OFF64_T
@@ -51,7 +51,6 @@  __libc_open64 (const char *file, int oflag, ...)
 
 strong_alias (__libc_open64, __open64)
 libc_hidden_weak (__open64)
-weak_alias (__libc_open64, open64)
 
 #ifdef __OFF_T_MATCHES_OFF64_T
 strong_alias (__libc_open64, __libc_open)
@@ -59,3 +58,11 @@  strong_alias (__libc_open64, __open)
 libc_hidden_weak (__open)
 weak_alias (__libc_open64, open)
 #endif
+
+#if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__libc_open64, __compat_open64)
+compat_symbol (libc, __compat_open64, open64, GLIBC_2_1);
+versioned_symbol (libc, __libc_open64, open64, GLIBC_2_2);
+#else
+weak_alias (__libc_open64, open64)
+#endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index e6fd54355e..1861a901e9 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -1876,6 +1876,7 @@  GLIBC_2.2 mkstemp64 F
 GLIBC_2.2 moncontrol F
 GLIBC_2.2 msgctl F
 GLIBC_2.2 ngettext F
+GLIBC_2.2 open64 F
 GLIBC_2.2 posix_fadvise F
 GLIBC_2.2 posix_fadvise64 F
 GLIBC_2.2 posix_fallocate F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
index 038e8337bb..31c709d9e5 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
@@ -4,7 +4,6 @@  GLIBC_2.0 _IO_funlockfile F
 GLIBC_2.0 __errno_location F
 GLIBC_2.0 __fcntl F
 GLIBC_2.0 __h_errno_location F
-GLIBC_2.0 __open F
 GLIBC_2.0 __pthread_getspecific F
 GLIBC_2.0 __pthread_key_create F
 GLIBC_2.0 __pthread_mutex_destroy F
@@ -27,7 +26,6 @@  GLIBC_2.0 flockfile F
 GLIBC_2.0 ftrylockfile F
 GLIBC_2.0 funlockfile F
 GLIBC_2.0 longjmp F
-GLIBC_2.0 open F
 GLIBC_2.0 pause F
 GLIBC_2.0 pthread_atfork F
 GLIBC_2.0 pthread_cancel F
@@ -117,7 +115,6 @@  GLIBC_2.12 pthread_mutexattr_setrobust F
 GLIBC_2.12 pthread_setname_np F
 GLIBC_2.18 pthread_getattr_default_np F
 GLIBC_2.18 pthread_setattr_default_np F
-GLIBC_2.2 __open64 F
 GLIBC_2.2 __pread64 F
 GLIBC_2.2 __pthread_rwlock_destroy F
 GLIBC_2.2 __pthread_rwlock_init F
@@ -128,7 +125,6 @@  GLIBC_2.2 __pthread_rwlock_unlock F
 GLIBC_2.2 __pthread_rwlock_wrlock F
 GLIBC_2.2 __pwrite64 F
 GLIBC_2.2 __res_state F
-GLIBC_2.2 open64 F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
 GLIBC_2.2 pthread_attr_getstack F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index fbacd7a032..20c9c6cba4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -1880,6 +1880,7 @@  GLIBC_2.2 mkstemp64 F
 GLIBC_2.2 moncontrol F
 GLIBC_2.2 msgctl F
 GLIBC_2.2 ngettext F
+GLIBC_2.2 open64 F
 GLIBC_2.2 posix_fadvise F
 GLIBC_2.2 posix_fadvise64 F
 GLIBC_2.2 posix_fallocate F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist
index 13ed1004dd..3a9630797f 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist
@@ -36,8 +36,6 @@  GLIBC_2.3 __h_errno_location F
 GLIBC_2.3 __libc_allocate_rtsig F
 GLIBC_2.3 __libc_current_sigrtmax F
 GLIBC_2.3 __libc_current_sigrtmin F
-GLIBC_2.3 __open F
-GLIBC_2.3 __open64 F
 GLIBC_2.3 __pread64 F
 GLIBC_2.3 __pthread_getspecific F
 GLIBC_2.3 __pthread_key_create F
@@ -70,8 +68,6 @@  GLIBC_2.3 flockfile F
 GLIBC_2.3 ftrylockfile F
 GLIBC_2.3 funlockfile F
 GLIBC_2.3 longjmp F
-GLIBC_2.3 open F
-GLIBC_2.3 open64 F
 GLIBC_2.3 pause F
 GLIBC_2.3 pread F
 GLIBC_2.3 pread64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist
index 9f26a5dc41..d398a424d1 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist
@@ -7,8 +7,6 @@  GLIBC_2.17 __h_errno_location F
 GLIBC_2.17 __libc_allocate_rtsig F
 GLIBC_2.17 __libc_current_sigrtmax F
 GLIBC_2.17 __libc_current_sigrtmin F
-GLIBC_2.17 __open F
-GLIBC_2.17 __open64 F
 GLIBC_2.17 __pread64 F
 GLIBC_2.17 __pthread_cleanup_routine F
 GLIBC_2.17 __pthread_getspecific F
@@ -47,8 +45,6 @@  GLIBC_2.17 flockfile F
 GLIBC_2.17 ftrylockfile F
 GLIBC_2.17 funlockfile F
 GLIBC_2.17 longjmp F
-GLIBC_2.17 open F
-GLIBC_2.17 open64 F
 GLIBC_2.17 pause F
 GLIBC_2.17 pread F
 GLIBC_2.17 pread64 F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libpthread.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libpthread.abilist
index 7d9b3293bc..aaa932f5d0 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv32/libpthread.abilist
@@ -6,8 +6,6 @@  GLIBC_2.33 __h_errno_location F
 GLIBC_2.33 __libc_allocate_rtsig F
 GLIBC_2.33 __libc_current_sigrtmax F
 GLIBC_2.33 __libc_current_sigrtmin F
-GLIBC_2.33 __open F
-GLIBC_2.33 __open64 F
 GLIBC_2.33 __pread64 F
 GLIBC_2.33 __pthread_cleanup_routine F
 GLIBC_2.33 __pthread_getspecific F
@@ -57,8 +55,6 @@  GLIBC_2.33 mtx_lock F
 GLIBC_2.33 mtx_timedlock F
 GLIBC_2.33 mtx_trylock F
 GLIBC_2.33 mtx_unlock F
-GLIBC_2.33 open F
-GLIBC_2.33 open64 F
 GLIBC_2.33 pause F
 GLIBC_2.33 pread F
 GLIBC_2.33 pread64 F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist
index daaeda7f16..37829b5045 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist
@@ -7,8 +7,6 @@  GLIBC_2.27 __h_errno_location F
 GLIBC_2.27 __libc_allocate_rtsig F
 GLIBC_2.27 __libc_current_sigrtmax F
 GLIBC_2.27 __libc_current_sigrtmin F
-GLIBC_2.27 __open F
-GLIBC_2.27 __open64 F
 GLIBC_2.27 __pread64 F
 GLIBC_2.27 __pthread_cleanup_routine F
 GLIBC_2.27 __pthread_getspecific F
@@ -46,8 +44,6 @@  GLIBC_2.27 fcntl F
 GLIBC_2.27 flockfile F
 GLIBC_2.27 ftrylockfile F
 GLIBC_2.27 funlockfile F
-GLIBC_2.27 open F
-GLIBC_2.27 open64 F
 GLIBC_2.27 pause F
 GLIBC_2.27 pread F
 GLIBC_2.27 pread64 F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index 95b93a7369..d821c145a0 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -1874,6 +1874,7 @@  GLIBC_2.2 mkstemp64 F
 GLIBC_2.2 moncontrol F
 GLIBC_2.2 msgctl F
 GLIBC_2.2 ngettext F
+GLIBC_2.2 open64 F
 GLIBC_2.2 posix_fadvise F
 GLIBC_2.2 posix_fadvise64 F
 GLIBC_2.2 posix_fallocate F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
index f961e40817..82c1197d18 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
@@ -4,7 +4,6 @@  GLIBC_2.0 _IO_funlockfile F
 GLIBC_2.0 __errno_location F
 GLIBC_2.0 __fcntl F
 GLIBC_2.0 __h_errno_location F
-GLIBC_2.0 __open F
 GLIBC_2.0 __pthread_getspecific F
 GLIBC_2.0 __pthread_key_create F
 GLIBC_2.0 __pthread_mutex_destroy F
@@ -27,7 +26,6 @@  GLIBC_2.0 flockfile F
 GLIBC_2.0 ftrylockfile F
 GLIBC_2.0 funlockfile F
 GLIBC_2.0 longjmp F
-GLIBC_2.0 open F
 GLIBC_2.0 pause F
 GLIBC_2.0 pthread_atfork F
 GLIBC_2.0 pthread_cancel F
@@ -119,7 +117,6 @@  GLIBC_2.18 pthread_getattr_default_np F
 GLIBC_2.18 pthread_setattr_default_np F
 GLIBC_2.19 longjmp F
 GLIBC_2.19 siglongjmp F
-GLIBC_2.2 __open64 F
 GLIBC_2.2 __pread64 F
 GLIBC_2.2 __pthread_rwlock_destroy F
 GLIBC_2.2 __pthread_rwlock_init F
@@ -130,7 +127,6 @@  GLIBC_2.2 __pthread_rwlock_unlock F
 GLIBC_2.2 __pthread_rwlock_wrlock F
 GLIBC_2.2 __pwrite64 F
 GLIBC_2.2 __res_state F
-GLIBC_2.2 open64 F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
 GLIBC_2.2 pthread_attr_getstack F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
index e24d70bbb7..2c779e7552 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
@@ -17,8 +17,6 @@  GLIBC_2.2 __h_errno_location F
 GLIBC_2.2 __libc_allocate_rtsig F
 GLIBC_2.2 __libc_current_sigrtmax F
 GLIBC_2.2 __libc_current_sigrtmin F
-GLIBC_2.2 __open F
-GLIBC_2.2 __open64 F
 GLIBC_2.2 __pread64 F
 GLIBC_2.2 __pthread_getspecific F
 GLIBC_2.2 __pthread_key_create F
@@ -51,8 +49,6 @@  GLIBC_2.2 flockfile F
 GLIBC_2.2 ftrylockfile F
 GLIBC_2.2 funlockfile F
 GLIBC_2.2 longjmp F
-GLIBC_2.2 open F
-GLIBC_2.2 open64 F
 GLIBC_2.2 pause F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist
index 6208e93259..bd9ca34250 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist
@@ -15,8 +15,6 @@  GLIBC_2.2 __h_errno_location F
 GLIBC_2.2 __libc_allocate_rtsig F
 GLIBC_2.2 __libc_current_sigrtmax F
 GLIBC_2.2 __libc_current_sigrtmin F
-GLIBC_2.2 __open F
-GLIBC_2.2 __open64 F
 GLIBC_2.2 __pread64 F
 GLIBC_2.2 __pthread_getspecific F
 GLIBC_2.2 __pthread_key_create F
@@ -49,8 +47,6 @@  GLIBC_2.2 flockfile F
 GLIBC_2.2 ftrylockfile F
 GLIBC_2.2 funlockfile F
 GLIBC_2.2 longjmp F
-GLIBC_2.2 open F
-GLIBC_2.2 open64 F
 GLIBC_2.2 pause F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist
index 6208e93259..bd9ca34250 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist
@@ -15,8 +15,6 @@  GLIBC_2.2 __h_errno_location F
 GLIBC_2.2 __libc_allocate_rtsig F
 GLIBC_2.2 __libc_current_sigrtmax F
 GLIBC_2.2 __libc_current_sigrtmin F
-GLIBC_2.2 __open F
-GLIBC_2.2 __open64 F
 GLIBC_2.2 __pread64 F
 GLIBC_2.2 __pthread_getspecific F
 GLIBC_2.2 __pthread_key_create F
@@ -49,8 +47,6 @@  GLIBC_2.2 flockfile F
 GLIBC_2.2 ftrylockfile F
 GLIBC_2.2 funlockfile F
 GLIBC_2.2 longjmp F
-GLIBC_2.2 open F
-GLIBC_2.2 open64 F
 GLIBC_2.2 pause F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index a660a9f062..7006678a9a 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -1870,6 +1870,7 @@  GLIBC_2.2 mkstemp64 F
 GLIBC_2.2 moncontrol F
 GLIBC_2.2 msgctl F
 GLIBC_2.2 ngettext F
+GLIBC_2.2 open64 F
 GLIBC_2.2 posix_fadvise F
 GLIBC_2.2 posix_fadvise64 F
 GLIBC_2.2 posix_fallocate F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
index 9b68d0c9e7..db0e35fccd 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
@@ -4,7 +4,6 @@  GLIBC_2.0 _IO_funlockfile F
 GLIBC_2.0 __errno_location F
 GLIBC_2.0 __fcntl F
 GLIBC_2.0 __h_errno_location F
-GLIBC_2.0 __open F
 GLIBC_2.0 __pthread_getspecific F
 GLIBC_2.0 __pthread_key_create F
 GLIBC_2.0 __pthread_mutex_destroy F
@@ -27,7 +26,6 @@  GLIBC_2.0 flockfile F
 GLIBC_2.0 ftrylockfile F
 GLIBC_2.0 funlockfile F
 GLIBC_2.0 longjmp F
-GLIBC_2.0 open F
 GLIBC_2.0 pause F
 GLIBC_2.0 pthread_atfork F
 GLIBC_2.0 pthread_cancel F
@@ -117,7 +115,6 @@  GLIBC_2.12 pthread_mutexattr_setrobust F
 GLIBC_2.12 pthread_setname_np F
 GLIBC_2.18 pthread_getattr_default_np F
 GLIBC_2.18 pthread_setattr_default_np F
-GLIBC_2.2 __open64 F
 GLIBC_2.2 __pread64 F
 GLIBC_2.2 __pthread_rwlock_destroy F
 GLIBC_2.2 __pthread_rwlock_init F
@@ -128,7 +125,6 @@  GLIBC_2.2 __pthread_rwlock_unlock F
 GLIBC_2.2 __pthread_rwlock_wrlock F
 GLIBC_2.2 __pwrite64 F
 GLIBC_2.2 __res_state F
-GLIBC_2.2 open64 F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
 GLIBC_2.2 pthread_attr_getstack F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
index 4d2ec9b1f2..f8e9c078cb 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
@@ -15,8 +15,6 @@  GLIBC_2.2 __h_errno_location F
 GLIBC_2.2 __libc_allocate_rtsig F
 GLIBC_2.2 __libc_current_sigrtmax F
 GLIBC_2.2 __libc_current_sigrtmin F
-GLIBC_2.2 __open F
-GLIBC_2.2 __open64 F
 GLIBC_2.2 __pread64 F
 GLIBC_2.2 __pthread_getspecific F
 GLIBC_2.2 __pthread_key_create F
@@ -49,8 +47,6 @@  GLIBC_2.2 flockfile F
 GLIBC_2.2 ftrylockfile F
 GLIBC_2.2 funlockfile F
 GLIBC_2.2 longjmp F
-GLIBC_2.2 open F
-GLIBC_2.2 open64 F
 GLIBC_2.2 pause F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
index 6b7344215c..3fdae7c2cb 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
@@ -15,8 +15,6 @@  GLIBC_2.2.5 __h_errno_location F
 GLIBC_2.2.5 __libc_allocate_rtsig F
 GLIBC_2.2.5 __libc_current_sigrtmax F
 GLIBC_2.2.5 __libc_current_sigrtmin F
-GLIBC_2.2.5 __open F
-GLIBC_2.2.5 __open64 F
 GLIBC_2.2.5 __pread64 F
 GLIBC_2.2.5 __pthread_getspecific F
 GLIBC_2.2.5 __pthread_key_create F
@@ -49,8 +47,6 @@  GLIBC_2.2.5 flockfile F
 GLIBC_2.2.5 ftrylockfile F
 GLIBC_2.2.5 funlockfile F
 GLIBC_2.2.5 longjmp F
-GLIBC_2.2.5 open F
-GLIBC_2.2.5 open64 F
 GLIBC_2.2.5 pause F
 GLIBC_2.2.5 pread F
 GLIBC_2.2.5 pread64 F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
index a8187ca67a..3b748f05e3 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
@@ -7,8 +7,6 @@  GLIBC_2.16 __h_errno_location F
 GLIBC_2.16 __libc_allocate_rtsig F
 GLIBC_2.16 __libc_current_sigrtmax F
 GLIBC_2.16 __libc_current_sigrtmin F
-GLIBC_2.16 __open F
-GLIBC_2.16 __open64 F
 GLIBC_2.16 __pread64 F
 GLIBC_2.16 __pthread_cleanup_routine F
 GLIBC_2.16 __pthread_getspecific F
@@ -47,8 +45,6 @@  GLIBC_2.16 flockfile F
 GLIBC_2.16 ftrylockfile F
 GLIBC_2.16 funlockfile F
 GLIBC_2.16 longjmp F
-GLIBC_2.16 open F
-GLIBC_2.16 open64 F
 GLIBC_2.16 pause F
 GLIBC_2.16 pread F
 GLIBC_2.16 pread64 F