[kaffe] System code and kaffe
robilad at kaffe.org
Fri Feb 27 07:36:02 PST 2004
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 . 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
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 . You may also want to use the
ELF loading implementation from Archie Cobbs' JC .
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.
 See FAQ/FAQ.gcj for details.
 See http://emulin.netfort.gr.jp/ for a pure java X86 emulator that
supports ELF loading, as far as I can tell.
More information about the kaffe