summaryrefslogtreecommitdiff
path: root/nptl/compat-pthread_self.c
AgeCommit message (Collapse)Author
2018-01-01Update copyright dates with scripts/update-copyrights.Joseph Myers
* All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
2017-12-20nptl: Implement pthread_self in libc.so [BZ #22635]Florian Weimer
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.