This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Use of atexit for destructors on Solaris 7.
- To: ghazi at caip dot rutgers dot edu
- Subject: Re: Use of atexit for destructors on Solaris 7.
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Wed, 22 Mar 2000 01:04:37 +0100
- CC: gcc-bugs at gcc dot gnu dot org, mrs at windriver dot com, ross dot s at ihug dot co dot nz
- References: <200003212302.SAA05790@caip.rutgers.edu>
> Mike, I don't have a lot of confidence in pushing vendors. IMHO we
> should either always use the libgcc2.c atexit or change g++ to
> generate calls to some new function in libgcc2.c which keeps a dynamic
> list of destructors and register just that one function with system
> atexit so the destructor limit is always dynamic.
FWIW, the new ABI says the function to call is __cxa_atexit; that is
activated either with -fnew-abi, or -fuse-cxa-atexit. The real reason
for this function is that it is supposed to support unregistration of
atexit functions, though. It is implemented in glibc 2.1.3, and will
be provided by all ABI compliant systems.
Regards,
Martin