Minimal C++-Runtime on L4-Microkernel

Idea and Concept

In the DROPS L4Env integration, the C++ - runtime needs many L4env services.

What support do we need for exception handling ?

We want a very low level support for the exception handling for:

Other Ideas

Namespaces
There could be Namespaces for

Exception Handling in gcc/g++

After Linux from Scratch provides libsupc++ support for the c++ programming language. We find here: The main work is done in the language independent unwind mechanism (Files unwind*).

Critique

At the first throw the compile time information is interpreted and dynamical structures (malloc) are build. The code is brilliant, but hard to understand.

Some people don't want such a code in boot servers for performance and security reasons.

It seems, that nearly the whole classifications could be made at compiletime, and kept in the binary. For an alternative implementation, the idea of the Relative Pointers could be useful.

What we need

dynamic memory management malloc and free
the oskit implements it for us. Perhaps the above idea with the (more) static compiled exception-Tables could reduce the use.
Thread Specific Storage
Each thread in a C++ program has access to a __cxa_eh_globals object.

Discussion:

Thread-Abstraction
There exists a C-Interface for Threads : ./c++/3.2/i386-redhat-linux/bits/gthr.h.
I have ported a gthr-l4min.h which seems to be sufficcient for the need of C++. Objective C needs more. In this I used the primitivest locks from l4/util/lock.h)
registering in the start-code

Fazit

Bugs Summer 2003

Chances 10.1.2004

Bugs remains:

Lessons learned

The Startcode and the linkerscript

(Caution: I used a Version from Juli :-) The l4/pkg/crtx/lib/src/crt0_getopt.S don't call the constructors. Later I have read, that there is a Problem with location the .init-Section.
But I don't knew and tried it and this worked.

But in the mean time, there is only one crt0 for all since 10.1.2004 we use this.


Computer science and network assocation Ravensburg Rudolf Weber