Let's suppose that, under a particular platform, the compiler doesn't initialize correctly the constructors and destructors of a global object at startup.
The compiler is psp-gcc. I have written two routines, __do_constructor_initialization_aux and __do_destructor_initialization_aux that, if recalled explictly by the code of the program, start the routines generated by the compiler and initialize the global constructors (o deinitialize the constructors when the program finish). Unfortunately, each of this routine can access only to the .ctor or .dtor section of the module in which it is compiled, not to the .ctor or .dtor section of different modules. So, if you are compiling a project in C++ that contains n files .o, **in each of these** a routine __do_constructor_initialization_aux and a routine __do_destructor_initialization_aux must be present. If the project has n object .o, there will be n __do_constructor_initialization_aux routines and n __do_destructor_initialization_aux routines. N isn't a known number, because it depends from the o. files that the programmer chooses to create. The trouble is the following: who start these routines at startup ? It is needed a special symbol in psp-gcc or in psp-ld that makes that, at startup, before that main () is executed, the cpu executes all initialitation routines present in each module that has been linked. Any idea ? _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus