Date: Mon, 23 Aug 2010 15:38:02 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/lib/libc/gen Makefile.inc Symbol.map elf_utils.c src/lib/libc/include libc_private.h src/lib/libc/stdlib atexit.c src/lib/libthr pthread.map src/lib/libthr/thread thr_fork.c thr_private.h src/libexec/rtld-elf rtld.c Message-ID: <201008231538.o7NFcfVq023746@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
kib 2010-08-23 15:38:02 UTC FreeBSD src repository Modified files: lib/libc/gen Makefile.inc Symbol.map lib/libc/include libc_private.h lib/libc/stdlib atexit.c lib/libthr pthread.map lib/libthr/thread thr_fork.c thr_private.h libexec/rtld-elf rtld.c Added files: lib/libc/gen elf_utils.c Log: SVN rev 211706 on 2010-08-23 15:38:02Z by kib 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 Revision Changes Path 1.155 +1 -1 src/lib/libc/gen/Makefile.inc 1.35 +1 -0 src/lib/libc/gen/Symbol.map 1.1 +47 -0 src/lib/libc/gen/elf_utils.c (new) 1.25 +2 -0 src/lib/libc/include/libc_private.h 1.11 +20 -3 src/lib/libc/stdlib/atexit.c 1.34 +1 -0 src/lib/libthr/pthread.map 1.15 +22 -0 src/lib/libthr/thread/thr_fork.c 1.99 +3 -0 src/lib/libthr/thread/thr_private.h 1.155 +12 -0 src/libexec/rtld-elf/rtld.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008231538.o7NFcfVq023746>