From: Peter Soetens (peter.soetens_at_[hidden])
Date: 2002-02-20 07:24:34
We use RTLinux for our embedded systems and use C++ in our kernel-modules.
We can not use :
new/delete outside the constructors/destructors (it will compile/load but
crash on execution)
The workaround is done by defining ourselves __pure_virtual etc, and mapping
new/delete to kmalloc/kfree and some other tweaks.
We manually link crtbegin.o and crtend.o to our kernel modules and (now
schrudder all together) manually invoke __do_global_ctors_aux() in
So that works. Using Boost in the same way requires first making (sgi-)STL
load in the kernel. This is done by defining a set of flags like #undef
__EXCEPTIONS, #defining _MALOC_H and _STDLIB_H and providing our own (kernel
specific) types and functions needed by STL. In this way, i could resolve
all symbols but one : the name mangled __builtin_new : __nw__FUiPv this
symbol is defined in libgcc.a and implemented in new.cc and "new" in the gcc
source tree. However, i did not succeed yet in replicating this symbol in my
own object files. The symbol should be there (since STL also includes new),
but it does not occur after compilation...
I believe that once STL got into the kernel, putting Boost in there will be
quite trivial (hold wood !)...
Any advice ?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk