C++: Difference between revisions

Jump to navigation Jump to search
674 bytes removed ,  10 years ago
GCC 3.2 is entirely obsolete and this section should just be removed to simplify the article
[unchecked revision][unchecked revision]
(The "start up code" section is inaccurate and this is already covered in Bare Bones.)
(GCC 3.2 is entirely obsolete and this section should just be removed to simplify the article)
Line 60:
void __cxa_finalize(void *f);
</source>
 
==== Versions before GCC 3.2 ====
GCC inserts an array of pointers into the object file. Look for the ELF section called '''ctors*'''. Each pointer indicates the constructor of a global / static object. Your Assembly start-up code should call them in turn before passing control to your C++ kernel code.
 
There also is a '''dtors*''' list of destructors. If your kernel returns, the shutdown code should also call them in turn. Remember to destruct your objects in the '''opposite''' order you have constructed them (for the sake of inner dependencies).
 
Additionally, you should see the [[C++ Bare Bones]] tutorial for more information on how to call static constructors.
 
==== Versions after GCC 3.2 ====
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu