[kaffe] System code and kaffe
Dalibor Topic
robilad@kaffe.org
Fri Feb 27 07:36:02 2004
Hi Berlin,
Berlin Brown wrote:
> I do system work and want to use kaffe and java for system code. I could use C, but I think it would be interesting to use kaffe. So for example, I was thinking of building a custom loader and linker and also including interfaces for devices, assembly language etc. My design thus far is, use kaffe to create .class files, run my system which parses the byte code and then create .object files, the object files will then be executable. Ideally I want ELF and binary code. Is this insane? Is there something out there that does this. GCJ is too complex.
If you want to hack on kaffe, you're most cordially welcome!
Your idea is not half as insane as you may think. The basic building
blocks are there already.
Kaffe already has a gcj interface (unmaintained atm) that you may want
to look into [1]. With some work to catch up with the lot of recent gcj
development, it should be possible to make kaffe work with gcj'ed files
again.
Pocketlinux kaffe fork has another gcj interface that works with a
patched gcj. I assume that they would have hooks to work with gcj-ed
code as well, that would be nice to look into.
ELF loaders exist even in pure java [2]. You may also want to use the
ELF loading implementation from Archie Cobbs' JC [3].
Just make sure you're not tainted by reading Sun's sources/decompiling
their implementation or signed an NDA that prevents you from
contributing to Kaffe. Kaffe is a clean-room effort in order to avoid
anyone pulling a SCO on it.
cheers,
dalibor topic
[1] See FAQ/FAQ.gcj for details.
[2] See http://emulin.netfort.gr.jp/ for a pure java X86 emulator that
supports ELF loading, as far as I can tell.
[3] http://mail.gnu.org/archive/html/classpath/2004-02/msg00042.html