[K42-discussion] virtual destructors
Donour Sizemore
donour at cs.unm.edu
Thu Jul 13 07:32:35 EST 2006
>
> Donour, can you try inserting a DEFINE_NOOP_NEW() invocation into
> VAllocServices() (and anywhere else you've had to define virtual
> destructors), and see if that clears up the undefined symbol?
So the trickiest of these that I've found are the StubHEADER.H that
subgen generates. The natural solution is to emit a virtual destructor
along with each stub file. Something like:
--
...
printf("\tDEFINE_NOOP_NEW(%s);\n", sclass) > SF;
printf("\tvirtual ~%s() { }\n", sclass) > SF;
printf("};\n\n") > SF;
--
However I'm coming up with missing symbols.
powerpc64-linux-nm -p k42sys.o | egrep -w U
U __dso_handle
U .__cxa_atexit
I think these emitted from the initialization of global objects. Indeed,
here is every object that references them:
../install/lib/powerpc/fullDeb/libbase.a:ProgExec.o: U
.__cxa_atexit
../powerpc/fullDeb/lib/libc/usr/ProgExec.o: U .__cxa_atexit
../powerpc/fullDeb/os/kernel/init/AsyncTester.o: U
.__cxa_atexit
../powerpc/fullDeb/os/servers/baseServers/FileSystemNFS.o:
U .__cxa_atexit
../powerpc/fullDeb/os/servers/baseServers/FileSystemK42RamFS.o:
U .__cxa_atexit
../powerpc/fullDeb/os/servers/baseServers/FileSystemKFSK42.o:
U .__cxa_atexit
../powerpc/fullDeb/os/servers/k42Ramfs/FileSystemK42RamFS.o:
U .__cxa_atexit
I tried to add definitions of __dso_handle and atexit to ProgExec and
AsyncTester, but it appears they are already defined there. Ideas? :)
donour
More information about the K42-discussion
mailing list