This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Atexit and Solaris 8


In the ongoing C++ finalizer's saga, it appears that Solaris 8 adds a
new episode. According to the Sun Workshop 6 (aka Forte)
documentation, getting the atexit interleaving right is difficult
without support from the operating system
(http://docs.sun.com/htmlcoll/coll.32.8/iso-8859-1/CPPMIGRATE/Ch3.Std.html#21223)

They mention that Solaris 8 has the necessary support. Indeed, Solaris
8 allows me to register more than 128 atexit functions, where Solaris
2.6 would accept only 34 (I did not try to determine an upper limit; I
hope it's memory-bound). They also claim that the workshop-compiled
executables will only use atexit if the operating system support is
there, and that they detect this at run-time.

Does anybody know how this mechanism works? I found a function bool
__Cimpl::new_atexit_implemented() in libCrun, but I can't find out
what it does. Also, does anybody know whether unregistration of
functions registered from dynamically-loaded objects is supported?

IMO, it would be useful to implement the new C++ ABI on top of such C
library support, so that it can fully work on more systems that just
glibc, even before vendors release ABI-conforming versions of their C
libraries (which they might do only for ia64, anyway).

Regards,
Martin

P.S. I'm glad Sun noticed limiting atexit is a problem after all these
years.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]