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
..
2010-07-10 03:45:55 +00:00
2010-08-03 18:29:58 +00:00
2010-03-02 16:58:04 +00:00
2010-08-06 14:33:42 +00:00
2010-08-03 17:40:09 +00:00
2010-08-03 17:40:09 +00:00
2010-06-13 01:27:29 +00:00
2010-01-02 09:58:07 +00:00
2010-08-03 17:40:09 +00:00
2010-01-02 09:58:07 +00:00
2010-05-03 09:49:42 +00:00
2010-08-11 17:33:26 +00:00
2010-08-03 17:40:09 +00:00
2010-01-21 15:01:09 +00:00
2010-08-22 11:48:32 +00:00
2010-01-02 09:58:07 +00:00
2010-04-20 21:14:30 +00:00
2010-07-31 16:12:47 +00:00