DTORS
Posted: Fri Jul 02, 2004 11:00 pm
I'm using the g++ that came with RH linux 8.
I had wrote my runtime support for constructors.
My Problem is with the Desctructors.
I can't add the Destructor for the Global Object classes.
If i put a destructor. I get some error in linking.
" undefined symbols. __dso_handle and __cxa_atexit "
__dso_handle is in data section.
__cxa_atexit may be a function.
I found this after doing some search in the "libc" with "objdump"
when I dump my kernel i cant found any .dtors section.
I just defined a variable and a dummy function as
extern "C" {
void *__dso_handle;
void __cxa_atexit() {
}
}
Now my linker is cheated by me.
BUT BUT BUT. HOW can I handle it properly.
When and how my destructors can be called without a .dtors section.
help me please...
thank you.
I had wrote my runtime support for constructors.
My Problem is with the Desctructors.
I can't add the Destructor for the Global Object classes.
If i put a destructor. I get some error in linking.
" undefined symbols. __dso_handle and __cxa_atexit "
__dso_handle is in data section.
__cxa_atexit may be a function.
I found this after doing some search in the "libc" with "objdump"
when I dump my kernel i cant found any .dtors section.
I just defined a variable and a dummy function as
extern "C" {
void *__dso_handle;
void __cxa_atexit() {
}
}
Now my linker is cheated by me.
BUT BUT BUT. HOW can I handle it properly.
When and how my destructors can be called without a .dtors section.
help me please...
thank you.