c++.rtl - static constuctors call
- Sc_ (14/14) Aug 04 2004 Guys! All information which can be found in reference is:
- Walter (8/16) Aug 05 2004 the
- Alexander Beletsky (4/22) Aug 05 2004 Thanks! Actually, I thought so...
- Walter (5/8) Aug 06 2004 by
Guys! All information which can be found in reference is: "pointer to the constructor or destructor function is placed in a special segment (XIFU, XIFL, or XIFM). The startup code cinit.obj then looks at the constructor segment and calls the constructors. The exit function calls the destructors by looking at the destructor segment XOF (for near data models) or XO (for far data models)." Could someone describe all special segments more precisely? Which of them contains pointers to constuctors, destructors, c initializers and so on. Actually, how can these pointer be reached, I found very good example how to do it with MS compiler (http://www.codeguru.com/Cpp/misc/misc/threadsprocesses/article.php/c6945__2/) Could some one give example how the same can be done with DigitalMarc compiler/linker. Thank you very much!
Aug 04 2004
"Sc_" <Sc__member pathlink.com> wrote in message news:cer4e6$7hp$1 digitaldaemon.com...Guys! All information which can be found in reference is: "pointer to the constructor or destructor function is placed in a special segment (XIFU, XIFL, or XIFM). The startup code cinit.obj then looks attheconstructor segment and calls the constructors. The exit function callsthedestructors by looking at the destructor segment XOF (for near datamodels) orXO (for far data models)." Could someone describe all special segments more precisely? Which of them contains pointers to constuctors, destructors, c initializers and so on.It isn't written down anywhere, but you can see what's happening by writing simple C++ files that contain the various features, compile them, and run obj2asm on them.
Aug 05 2004
Thanks! Actually, I thought so... Currently I have no obj2asm tool, but I explore the .map file genereated by linked. It haelped me a lot. In article <ceuv7g$2l0j$1 digitaldaemon.com>, Walter says..."Sc_" <Sc__member pathlink.com> wrote in message news:cer4e6$7hp$1 digitaldaemon.com...Guys! All information which can be found in reference is: "pointer to the constructor or destructor function is placed in a special segment (XIFU, XIFL, or XIFM). The startup code cinit.obj then looks attheconstructor segment and calls the constructors. The exit function callsthedestructors by looking at the destructor segment XOF (for near datamodels) orXO (for far data models)." Could someone describe all special segments more precisely? Which of them contains pointers to constuctors, destructors, c initializers and so on.It isn't written down anywhere, but you can see what's happening by writing simple C++ files that contain the various features, compile them, and run obj2asm on them.
Aug 05 2004
"Alexander Beletsky" <Alexander_member pathlink.com> wrote in message news:cev8tp$2slk$1 digitaldaemon.com...Thanks! Actually, I thought so... Currently I have no obj2asm tool, but I explore the .map file genereatedbylinked. It haelped me a lot.obj2asm is available with the extended utility package, www.digitalmars.com/eup.html or the compiler CD www.digitalmars.com/cd.html
Aug 06 2004