freebsd-skq/libexec/rtld-elf
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
..
amd64 Only use the cache after the early stage of loading. This is 2010-05-18 08:55:23 +00:00
arm Only use the cache after the early stage of loading. This is 2010-05-18 08:55:23 +00:00
i386 Only use the cache after the early stage of loading. This is 2010-05-18 08:55:23 +00:00
ia64 Now that the kernel defines CACHE_LINE_SIZE in machine/param.h, use 2009-04-19 23:02:50 +00:00
mips Add parentheses around the argument 'x' used in the __bswapXX(x) macros. Revert 2010-08-11 02:28:39 +00:00
powerpc Only use the cache after the early stage of loading. This is 2010-05-18 08:55:23 +00:00
powerpc64 RTLD support for powerpc64. A few small modifications to the Makefile 2010-07-10 17:43:24 +00:00
sparc64 Only use the cache after the early stage of loading. This is 2010-05-18 08:55:23 +00:00
debug.c
debug.h Use C99's varadic macro syntax instead of gcc's. 2006-03-28 18:26:47 +00:00
libmap.c Fix a malloc overrun in 32-bit compat libmap lookup code. 2006-01-31 06:08:28 +00:00
libmap.h Description from Dan: 2005-02-04 02:46:41 +00:00
Makefile RTLD support for powerpc64. A few small modifications to the Makefile 2010-07-10 17:43:24 +00:00
malloc.c Use the newly provided aux vectors to get pagesize and osreldate information. 2010-08-17 09:05:39 +00:00
map_object.c In rtld's map_object(), use pread(..., 0) rather than read() to read the 2009-10-06 17:14:39 +00:00
rtld_lock.c Prefer <sys/param.h> to <machine/param.h> for the definition of 2009-04-20 10:35:50 +00:00
rtld_lock.h Provide custom simple allocator for rtld locks in libthr. The allocator 2008-12-02 11:58:31 +00:00
rtld_tls.h
rtld.1 Document RTLD_NODELETE, -z nodelete and -z origin support. 2009-04-01 14:38:20 +00:00
rtld.c On shared object unload, in __cxa_finalize, call and clear all installed 2010-08-23 15:38:02 +00:00
rtld.h Allow to load not-openable dso when tracing. This fixes ldd on such dso or 2009-11-28 14:29:32 +00:00
Symbol.map Introduce implementation-private rtld interface _rtld_addr_phdr, which 2010-08-23 15:27:03 +00:00
xmalloc.c