Author :
guenther
Date :
2016-05-07 19:05:21
Hash :fe38b55c Message :Use a Thread Information Block in both single and multi-threaded programs.
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable!
Make libpthread dlopen'able by moving the cancelation wrappers into libc
and doing locking and fork/errno handling via callbacks that libpthread
registers when it first initializes. 'errno' *must* be declared via
<errno.h> now!
Clean up libpthread's symbol exports like libc.
On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.
Testing by various, particularly sthen@ and patrick@
ok kettenis@
libexec/ld.so/Symbols.map
{
global:
/* actual exports */
dl_iterate_phdr;
dladdr;
dlclose;
dlctl;
dlerror;
dlopen;
dlsym;
environ;
__progname;
/* alias in reserved namespace for libpthread to use */
_dlctl;
/* TLS related bits */
_dl_allocate_tib;
_dl_free_tib;
/* looked up by gdb */
_dl_bind;
_dl_debug_state;
local:
*;
};