diff options
author | Florian Weimer <fweimer@redhat.com> | 2017-12-20 11:40:36 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2017-12-20 11:42:04 +0100 |
commit | 8a26ad2ab7396bc94fd3cd7b25cba433908d30e1 (patch) | |
tree | 3e87bff8b59daaa5c7564532cc48c8d53ee5f7db /sysdeps/nptl | |
parent | 5069ff32842c60c55f8b573ee66fe43f9ec364af (diff) | |
download | glibc-8a26ad2ab7396bc94fd3cd7b25cba433908d30e1.tar.gz glibc-8a26ad2ab7396bc94fd3cd7b25cba433908d30e1.tar.xz glibc-8a26ad2ab7396bc94fd3cd7b25cba433908d30e1.zip |
nptl: Implement pthread_self in libc.so [BZ #22635]
All binaries use TLS and thus need a properly set up TCB, so we can simply return its address directly, instead of forwarding to the libpthread implementation from libc. For versioned symbols, the dynamic linker checks that the soname matches the name supplied by the link editor, so a compatibility symbol in libpthread is needed. To avoid linking against the libpthread function in all cases, we would have to bump the symbol version of libpthread in libc.so and supply a compat symbol. This commit does not do that because the function implementation is so small, so the overhead by two active copies of the same function might well be smaller than the increase in symbol table size.
Diffstat (limited to 'sysdeps/nptl')
-rw-r--r-- | sysdeps/nptl/pthread-functions.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/sysdeps/nptl/pthread-functions.h b/sysdeps/nptl/pthread-functions.h index 4006fc6c25..4af21425d3 100644 --- a/sysdeps/nptl/pthread-functions.h +++ b/sysdeps/nptl/pthread-functions.h @@ -74,7 +74,6 @@ struct pthread_functions const pthread_mutexattr_t *); int (*ptr_pthread_mutex_lock) (pthread_mutex_t *); int (*ptr_pthread_mutex_unlock) (pthread_mutex_t *); - pthread_t (*ptr_pthread_self) (void); int (*ptr___pthread_setcancelstate) (int, int *); int (*ptr_pthread_setcanceltype) (int, int *); void (*ptr___pthread_cleanup_upto) (__jmp_buf, char *); |