This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
C++ code initialization
- From: Rayiner Hashem <heliosc at mindspring dot com>
- To: gcc at gcc dot gnu dot org
- Date: 05 May 2002 14:11:16 -0400
- Subject: C++ code initialization
I have a question about what steps are necessary to properly initialize
C++ code compiled by GCC. I'm trying to use C++ an in OS kernel and
can't depend on glibc running certain initialization tasks. I know that
the functions in the .ctors and .dtors sections have to be called in
order to run constructors for static objects, and just doing running
those functions seems to be enough to get most C++ features working.
However, RTTI and exception handling require more runtime support, and I
was wondering what initialization those bits needed. On a related note,
I've been looking around for detailed information about the code GCC
produces, and while some aspects (like the global constructor mechanism)
are well documented, others (like exception handling) are not. In
particular, there is a dearth of information about the new C++ ABI.
While CodeSourcery's site is mildly useful, they don't give any
information about implementation (specifically, GCC's) and have
documentation on only parts of the ABI (exception handling on i386). I
was wondering if there was any other documentation I was missing, or any
blurbs on the generalities of the ABI so I at least had something to
work from while reading the code.
Thanks in advance,
Rayiner Hashem.