freebsd-skq/lib/libthr
Konstantin Belousov ea246b6369 On shared object unload, in __cxa_finalize, call and clear all installed
atexit and __cxa_atexit handlers that are either installed by unloaded
dso, or points to the functions provided by the dso.

Use _rtld_addr_phdr to locate segment information from the address of
private variable belonging to the dso, supplied by crtstuff.c. Provide
utility function __elf_phdr_match_addr to do the match of address against
dso executable segment.

Call back into libthr from __cxa_finalize using weak
__pthread_cxa_finalize symbol to remove any atfork handler which
function points into unloaded object.

The rtld needs private __pthread_cxa_finalize symbol to not require
resolution of the weak undefined symbol at initialization time. This
cannot work, since rtld is relocated before sym_zero is set up.

Idea by:	kan
Reviewed by:	kan (previous version)
MFC after:	3 weeks
2010-08-23 15:38:02 +00:00
..
arch Fix SVN mismerge. We somehow ended up with the 32-bit powerpc version 2010-07-11 05:13:38 +00:00
support
sys
thread On shared object unload, in __cxa_finalize, call and clear all installed 2010-08-23 15:38:02 +00:00
libthr.3 mdoc: order prologue macros consistently by Dd/Dt/Os 2010-04-14 19:08:06 +00:00
Makefile Revert r199830 for now. Too many ports dlopen() libraries linked with 2009-11-28 14:34:28 +00:00
pthread.map On shared object unload, in __cxa_finalize, call and clear all installed 2010-08-23 15:38:02 +00:00