diff --git a/nptl/Makefile b/nptl/Makefile
index 2cc47620c6..4c7ae6a561 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -31,7 +31,7 @@ routines = alloca_cutoff forward libc-lowlevellock libc-cancellation \
 	   libc-cleanup libc_pthread_init libc_multiple_threads \
 	   register-atfork pthread_atfork pthread_self thrd_current \
 	   thrd_equal thrd_sleep thrd_yield pthread_equal \
-	   pthread_attr_destroy pthread_attr_init
+	   pthread_attr_destroy pthread_attr_init pthread_attr_getdetachstate
 shared-only-routines = forward
 static-only-routines = pthread_atfork
 
@@ -54,7 +54,7 @@ libpthread-routines = nptl-init nptlfreeres vars events version pt-interp \
 		      pthread_getconcurrency pthread_setconcurrency \
 		      pthread_getschedparam pthread_setschedparam \
 		      pthread_setschedprio \
-		      pthread_attr_getdetachstate pthread_attr_setdetachstate \
+		      pthread_attr_setdetachstate \
 		      pthread_attr_getguardsize pthread_attr_setguardsize \
 		      pthread_attr_getschedparam pthread_attr_setschedparam \
 		      pthread_attr_getschedpolicy pthread_attr_setschedpolicy \
diff --git a/nptl/Versions b/nptl/Versions
index 6d7dba9f3a..ae0a4cbb3f 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -49,7 +49,7 @@ libpthread {
 
     pthread_getschedparam; pthread_setschedparam;
 
-    pthread_attr_getdetachstate; pthread_attr_setdetachstate;
+    pthread_attr_setdetachstate;
     pthread_attr_getschedparam; pthread_attr_setschedparam;
     pthread_attr_getschedpolicy; pthread_attr_setschedpolicy;
     pthread_attr_getinheritsched; pthread_attr_setinheritsched;
diff --git a/nptl/forward.c b/nptl/forward.c
index d52b85b1c6..96454bcccf 100644
--- a/nptl/forward.c
+++ b/nptl/forward.c
@@ -56,9 +56,6 @@ name decl								      \
   FORWARD2 (name, int, decl, params, return defretval)
 
 
-FORWARD (pthread_attr_getdetachstate,
-	 (const pthread_attr_t *attr, int *detachstate), (attr, detachstate),
-	 0)
 FORWARD (pthread_attr_setdetachstate, (pthread_attr_t *attr, int detachstate),
 	 (attr, detachstate), 0)
 
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index dd052a5d1b..ea022eb0df 100644
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -72,7 +72,6 @@ void __nptl_set_robust (struct pthread *);
 #ifdef SHARED
 static const struct pthread_functions pthread_functions =
   {
-    .ptr_pthread_attr_getdetachstate = __pthread_attr_getdetachstate,
     .ptr_pthread_attr_setdetachstate = __pthread_attr_setdetachstate,
     .ptr_pthread_attr_getinheritsched = __pthread_attr_getinheritsched,
     .ptr_pthread_attr_setinheritsched = __pthread_attr_setinheritsched,
diff --git a/sysdeps/nptl/pthread-functions.h b/sysdeps/nptl/pthread-functions.h
index 838eabfea5..3fedc85db6 100644
--- a/sysdeps/nptl/pthread-functions.h
+++ b/sysdeps/nptl/pthread-functions.h
@@ -30,7 +30,6 @@ struct xid_command;
    the thread functions.  */
 struct pthread_functions
 {
-  int (*ptr_pthread_attr_getdetachstate) (const pthread_attr_t *, int *);
   int (*ptr_pthread_attr_setdetachstate) (pthread_attr_t *, int);
   int (*ptr_pthread_attr_getinheritsched) (const pthread_attr_t *, int *);
   int (*ptr_pthread_attr_setinheritsched) (pthread_attr_t *, int);
diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
index e516d5e0c8..308cb07afa 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
@@ -71,7 +71,6 @@ GLIBC_2.17 pause F
 GLIBC_2.17 pread F
 GLIBC_2.17 pread64 F
 GLIBC_2.17 pthread_attr_getaffinity_np F
-GLIBC_2.17 pthread_attr_getdetachstate F
 GLIBC_2.17 pthread_attr_getguardsize F
 GLIBC_2.17 pthread_attr_getinheritsched F
 GLIBC_2.17 pthread_attr_getschedparam F
diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
index f29e08ca0c..4be0af2dcb 100644
--- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
@@ -46,7 +46,6 @@ GLIBC_2.0 nanosleep F
 GLIBC_2.0 open F
 GLIBC_2.0 pause F
 GLIBC_2.0 pthread_atfork F
-GLIBC_2.0 pthread_attr_getdetachstate F
 GLIBC_2.0 pthread_attr_getinheritsched F
 GLIBC_2.0 pthread_attr_getschedparam F
 GLIBC_2.0 pthread_attr_getschedpolicy F
diff --git a/sysdeps/unix/sysv/linux/arm/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/libpthread.abilist
index e86e0003aa..5506395508 100644
--- a/sysdeps/unix/sysv/linux/arm/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/arm/libpthread.abilist
@@ -105,7 +105,6 @@ GLIBC_2.4 pause F
 GLIBC_2.4 pread F
 GLIBC_2.4 pread64 F
 GLIBC_2.4 pthread_attr_getaffinity_np F
-GLIBC_2.4 pthread_attr_getdetachstate F
 GLIBC_2.4 pthread_attr_getguardsize F
 GLIBC_2.4 pthread_attr_getinheritsched F
 GLIBC_2.4 pthread_attr_getschedparam F
diff --git a/sysdeps/unix/sysv/linux/csky/libpthread.abilist b/sysdeps/unix/sysv/linux/csky/libpthread.abilist
index ecfff6fe53..c04ceca73d 100644
--- a/sysdeps/unix/sysv/linux/csky/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libpthread.abilist
@@ -79,7 +79,6 @@ GLIBC_2.29 pause F
 GLIBC_2.29 pread F
 GLIBC_2.29 pread64 F
 GLIBC_2.29 pthread_attr_getaffinity_np F
-GLIBC_2.29 pthread_attr_getdetachstate F
 GLIBC_2.29 pthread_attr_getguardsize F
 GLIBC_2.29 pthread_attr_getinheritsched F
 GLIBC_2.29 pthread_attr_getschedparam F
diff --git a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
index d5f426f7ce..cc5c47a329 100644
--- a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
@@ -72,7 +72,6 @@ GLIBC_2.2 pause F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
 GLIBC_2.2 pthread_atfork F
-GLIBC_2.2 pthread_attr_getdetachstate F
 GLIBC_2.2 pthread_attr_getguardsize F
 GLIBC_2.2 pthread_attr_getinheritsched F
 GLIBC_2.2 pthread_attr_getschedparam F
diff --git a/sysdeps/unix/sysv/linux/i386/libpthread.abilist b/sysdeps/unix/sysv/linux/i386/libpthread.abilist
index 7021d9eca9..d8b02f94fa 100644
--- a/sysdeps/unix/sysv/linux/i386/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libpthread.abilist
@@ -46,7 +46,6 @@ GLIBC_2.0 nanosleep F
 GLIBC_2.0 open F
 GLIBC_2.0 pause F
 GLIBC_2.0 pthread_atfork F
-GLIBC_2.0 pthread_attr_getdetachstate F
 GLIBC_2.0 pthread_attr_getinheritsched F
 GLIBC_2.0 pthread_attr_getschedparam F
 GLIBC_2.0 pthread_attr_getschedpolicy F
diff --git a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
index 618d51f324..b02fee32e3 100644
--- a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
@@ -72,7 +72,6 @@ GLIBC_2.2 pause F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
 GLIBC_2.2 pthread_atfork F
-GLIBC_2.2 pthread_attr_getdetachstate F
 GLIBC_2.2 pthread_attr_getguardsize F
 GLIBC_2.2 pthread_attr_getinheritsched F
 GLIBC_2.2 pthread_attr_getschedparam F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
index e86e0003aa..5506395508 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
@@ -105,7 +105,6 @@ GLIBC_2.4 pause F
 GLIBC_2.4 pread F
 GLIBC_2.4 pread64 F
 GLIBC_2.4 pthread_attr_getaffinity_np F
-GLIBC_2.4 pthread_attr_getdetachstate F
 GLIBC_2.4 pthread_attr_getguardsize F
 GLIBC_2.4 pthread_attr_getinheritsched F
 GLIBC_2.4 pthread_attr_getschedparam F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
index 7021d9eca9..d8b02f94fa 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
@@ -46,7 +46,6 @@ GLIBC_2.0 nanosleep F
 GLIBC_2.0 open F
 GLIBC_2.0 pause F
 GLIBC_2.0 pthread_atfork F
-GLIBC_2.0 pthread_attr_getdetachstate F
 GLIBC_2.0 pthread_attr_getinheritsched F
 GLIBC_2.0 pthread_attr_getschedparam F
 GLIBC_2.0 pthread_attr_getschedpolicy F
diff --git a/sysdeps/unix/sysv/linux/microblaze/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/libpthread.abilist
index 4df2bc2b1b..4b0ab493e0 100644
--- a/sysdeps/unix/sysv/linux/microblaze/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/libpthread.abilist
@@ -71,7 +71,6 @@ GLIBC_2.18 pause F
 GLIBC_2.18 pread F
 GLIBC_2.18 pread64 F
 GLIBC_2.18 pthread_attr_getaffinity_np F
-GLIBC_2.18 pthread_attr_getdetachstate F
 GLIBC_2.18 pthread_attr_getguardsize F
 GLIBC_2.18 pthread_attr_getinheritsched F
 GLIBC_2.18 pthread_attr_getschedparam F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
index 50b90cb7c9..ae6122e607 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
@@ -46,7 +46,6 @@ GLIBC_2.0 nanosleep F
 GLIBC_2.0 open F
 GLIBC_2.0 pause F
 GLIBC_2.0 pthread_atfork F
-GLIBC_2.0 pthread_attr_getdetachstate F
 GLIBC_2.0 pthread_attr_getinheritsched F
 GLIBC_2.0 pthread_attr_getschedparam F
 GLIBC_2.0 pthread_attr_getschedpolicy F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
index 50b90cb7c9..ae6122e607 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
@@ -46,7 +46,6 @@ GLIBC_2.0 nanosleep F
 GLIBC_2.0 open F
 GLIBC_2.0 pause F
 GLIBC_2.0 pthread_atfork F
-GLIBC_2.0 pthread_attr_getdetachstate F
 GLIBC_2.0 pthread_attr_getinheritsched F
 GLIBC_2.0 pthread_attr_getschedparam F
 GLIBC_2.0 pthread_attr_getschedpolicy F
diff --git a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
index a696d0e8b8..b85db4ba7e 100644
--- a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
@@ -71,7 +71,6 @@ GLIBC_2.21 pause F
 GLIBC_2.21 pread F
 GLIBC_2.21 pread64 F
 GLIBC_2.21 pthread_attr_getaffinity_np F
-GLIBC_2.21 pthread_attr_getdetachstate F
 GLIBC_2.21 pthread_attr_getguardsize F
 GLIBC_2.21 pthread_attr_getinheritsched F
 GLIBC_2.21 pthread_attr_getschedparam F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
index 07afc0e902..cc39f0d6e3 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
@@ -46,7 +46,6 @@ GLIBC_2.0 nanosleep F
 GLIBC_2.0 open F
 GLIBC_2.0 pause F
 GLIBC_2.0 pthread_atfork F
-GLIBC_2.0 pthread_attr_getdetachstate F
 GLIBC_2.0 pthread_attr_getinheritsched F
 GLIBC_2.0 pthread_attr_getschedparam F
 GLIBC_2.0 pthread_attr_getschedpolicy F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist
index 444d07563d..2058cc0494 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist
@@ -93,7 +93,6 @@ GLIBC_2.3 open64 F
 GLIBC_2.3 pause F
 GLIBC_2.3 pread F
 GLIBC_2.3 pread64 F
-GLIBC_2.3 pthread_attr_getdetachstate F
 GLIBC_2.3 pthread_attr_getguardsize F
 GLIBC_2.3 pthread_attr_getinheritsched F
 GLIBC_2.3 pthread_attr_getschedparam F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist
index e516d5e0c8..308cb07afa 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist
@@ -71,7 +71,6 @@ GLIBC_2.17 pause F
 GLIBC_2.17 pread F
 GLIBC_2.17 pread64 F
 GLIBC_2.17 pthread_attr_getaffinity_np F
-GLIBC_2.17 pthread_attr_getdetachstate F
 GLIBC_2.17 pthread_attr_getguardsize F
 GLIBC_2.17 pthread_attr_getinheritsched F
 GLIBC_2.17 pthread_attr_getschedparam F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist
index 444454c54d..d80b204fb8 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist
@@ -68,7 +68,6 @@ GLIBC_2.27 pause F
 GLIBC_2.27 pread F
 GLIBC_2.27 pread64 F
 GLIBC_2.27 pthread_attr_getaffinity_np F
-GLIBC_2.27 pthread_attr_getdetachstate F
 GLIBC_2.27 pthread_attr_getguardsize F
 GLIBC_2.27 pthread_attr_getinheritsched F
 GLIBC_2.27 pthread_attr_getschedparam F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
index c5e5657656..c9adfaf03a 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
@@ -46,7 +46,6 @@ GLIBC_2.0 nanosleep F
 GLIBC_2.0 open F
 GLIBC_2.0 pause F
 GLIBC_2.0 pthread_atfork F
-GLIBC_2.0 pthread_attr_getdetachstate F
 GLIBC_2.0 pthread_attr_getinheritsched F
 GLIBC_2.0 pthread_attr_getschedparam F
 GLIBC_2.0 pthread_attr_getschedpolicy F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
index b1c57dfaed..f2a81cfb0c 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
@@ -74,7 +74,6 @@ GLIBC_2.2 pause F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
 GLIBC_2.2 pthread_atfork F
-GLIBC_2.2 pthread_attr_getdetachstate F
 GLIBC_2.2 pthread_attr_getguardsize F
 GLIBC_2.2 pthread_attr_getinheritsched F
 GLIBC_2.2 pthread_attr_getschedparam F
diff --git a/sysdeps/unix/sysv/linux/sh/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/libpthread.abilist
index d5f426f7ce..cc5c47a329 100644
--- a/sysdeps/unix/sysv/linux/sh/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sh/libpthread.abilist
@@ -72,7 +72,6 @@ GLIBC_2.2 pause F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
 GLIBC_2.2 pthread_atfork F
-GLIBC_2.2 pthread_attr_getdetachstate F
 GLIBC_2.2 pthread_attr_getguardsize F
 GLIBC_2.2 pthread_attr_getinheritsched F
 GLIBC_2.2 pthread_attr_getschedparam F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
index f29e08ca0c..4be0af2dcb 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
@@ -46,7 +46,6 @@ GLIBC_2.0 nanosleep F
 GLIBC_2.0 open F
 GLIBC_2.0 pause F
 GLIBC_2.0 pthread_atfork F
-GLIBC_2.0 pthread_attr_getdetachstate F
 GLIBC_2.0 pthread_attr_getinheritsched F
 GLIBC_2.0 pthread_attr_getschedparam F
 GLIBC_2.0 pthread_attr_getschedpolicy F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
index 618d51f324..b02fee32e3 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
@@ -72,7 +72,6 @@ GLIBC_2.2 pause F
 GLIBC_2.2 pread F
 GLIBC_2.2 pread64 F
 GLIBC_2.2 pthread_atfork F
-GLIBC_2.2 pthread_attr_getdetachstate F
 GLIBC_2.2 pthread_attr_getguardsize F
 GLIBC_2.2 pthread_attr_getinheritsched F
 GLIBC_2.2 pthread_attr_getschedparam F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
index 853f2b17de..f2cbb71691 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
@@ -72,7 +72,6 @@ GLIBC_2.2.5 pause F
 GLIBC_2.2.5 pread F
 GLIBC_2.2.5 pread64 F
 GLIBC_2.2.5 pthread_atfork F
-GLIBC_2.2.5 pthread_attr_getdetachstate F
 GLIBC_2.2.5 pthread_attr_getguardsize F
 GLIBC_2.2.5 pthread_attr_getinheritsched F
 GLIBC_2.2.5 pthread_attr_getschedparam F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
index c5fc9a23cd..4bbd6ed7a7 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
@@ -71,7 +71,6 @@ GLIBC_2.16 pause F
 GLIBC_2.16 pread F
 GLIBC_2.16 pread64 F
 GLIBC_2.16 pthread_attr_getaffinity_np F
-GLIBC_2.16 pthread_attr_getdetachstate F
 GLIBC_2.16 pthread_attr_getguardsize F
 GLIBC_2.16 pthread_attr_getinheritsched F
 GLIBC_2.16 pthread_attr_getschedparam F
