aboutsummaryrefslogtreecommitdiff
path: root/nptl/libc_pthread_init.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-04-21 19:49:51 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-04-21 19:49:51 +0200
commit1d67cf9e8a0194588e66fb3b7afcbdc3bf836a30 (patch)
treeb745791cf23c96def3d1330506a05732e65b4a7c /nptl/libc_pthread_init.c
parent486010a3c8cb59df19995eac964ef51e627287a4 (diff)
downloadglibc-1d67cf9e8a0194588e66fb3b7afcbdc3bf836a30.zip
glibc-1d67cf9e8a0194588e66fb3b7afcbdc3bf836a30.tar.gz
glibc-1d67cf9e8a0194588e66fb3b7afcbdc3bf836a30.tar.bz2
nptl: Remove remnants of the libc/libpthread forwarder interface
All previously forwarded functions are now implemented in libc. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl/libc_pthread_init.c')
-rw-r--r--nptl/libc_pthread_init.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/nptl/libc_pthread_init.c b/nptl/libc_pthread_init.c
index b67a69f..397b83b 100644
--- a/nptl/libc_pthread_init.c
+++ b/nptl/libc_pthread_init.c
@@ -35,38 +35,11 @@ extern int __libc_multiple_threads attribute_hidden;
int *
#endif
-__libc_pthread_init (void (*reclaim) (void),
- const struct pthread_functions *functions)
+__libc_pthread_init (void (*reclaim) (void))
{
/* Called by a child after fork. */
__register_atfork (NULL, NULL, reclaim, NULL);
-#ifdef SHARED
- /* Copy the function pointers into an array in libc. This enables
- access with just one memory reference but moreso, it prevents
- hijacking the function pointers with just one pointer change. We
- "encrypt" the function pointers since we cannot write-protect the
- array easily enough. */
- union ptrhack
- {
- struct pthread_functions pf;
-# define NPTRS (sizeof (struct pthread_functions) / sizeof (void *))
- void *parr[NPTRS];
- } __attribute__ ((may_alias)) const *src;
- union ptrhack *dest;
-
- src = (const void *) functions;
- dest = (void *) &__libc_pthread_functions;
-
- for (size_t cnt = 0; cnt < NPTRS; ++cnt)
- {
- void *p = src->parr[cnt];
- PTR_MANGLE (p);
- dest->parr[cnt] = p;
- }
- __libc_pthread_functions_init = 1;
-#endif
-
#ifndef TLS_MULTIPLE_THREADS_IN_TCB
return &__libc_multiple_threads;
#endif