http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54601
--- Comment #7 from David Edelsohn <dje at gcc dot gnu.org> 2013-01-30 16:59:13 UTC --- Created attachment 29307 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29307 cxa_atexit implementation in libgcc This version of the patch implements __cxa_atexit and __cxa_finalize in libgcc, not libsupc++, with no modifications to collect2. I am not sure if using a low priority C destructor to run __cxa_finalize early in the destructor list is correct. The original collect2 patch ran it last, after other destructors, which I believe is incorrect and does not match crtstuff.c semantics for ELF. When I configured GCC with the patch and --enable__cxa-atexit, I saw a few additional C++ errors in the testsuite.