C++ Bare Bones
Posted: Thu Jun 04, 2009 12:48 pm
Hi,
I've got a question about the following turtorial
http://wiki.osdev.org/C_PlusPlus_bare_bones
I don't understand about following part with with piece of code it's connected
I've got a question about the following turtorial
http://wiki.osdev.org/C_PlusPlus_bare_bones
I don't understand about following part with with piece of code it's connected
it's in loader.s document, does this mean that this piece is from NASM or from the GAS codeC/C++
typedef unsigned long vintp; //- integer type to store a pointer.
extern start_ctors, end_ctors, start_dtors, end_dtors;
void loader(void) {
//- call all the static constructors in the list.
for(vintp * call = &start_ctors; call < &end_ctors; call++) {
((void (*)(void))*call)();
}
//- call kernel proper
main();
//- call all the static destructors in the list.
for(vintp * call = &start_dtors; call < &end_dtors; call++) {
((void (*)(void))*call)();
}
}