[Prev][Next][Index][Thread]

Re: No luck with Kaffe




Kaffe needs to be able to look up native methods.
For instance, java.lang.Throwable has a native method named
fillInStackTrace().  The corresponding C symbol for this method would
be, for instance, java_lang_Throwable_fillInStackTrace or
Java_java_lang_Throwable_fillInStackTrace in the case of JNI.

If Kaffe lives in a unixy shared library world, this symbol is found
by doing a dlopen/dlsym.

If Kaffe lives in a static library world (OSKit), this symbol is found
in an internal table that is created at compile/link time.

For the lookup part, Kaffe currently uses a part of libtool called "libltdl".
The idea here is to provide a common interface for both worlds, shared
and static, and even to allow mixing the two.

libltdl is really only a front-end that actually calls dlopen/dlsym
or looks the symbol up in the internal table or does whatever is appropriate.
It uses the .la files to do that.  These files really only contain
a textual description of what to do.

Hope that helps.

As an aside, maybe I was a bit too discouraging in my previous mail
regarding --host/--target.  Our goal is for you to be able to compile
and build Kaffe for the OSKit by doing ./configure --host=i386-oskit.

Alexandre, coauthor of libtool and strong proponent of automake and
related GNU tools pretty much promised us that we'll do whatever it
takes to us get there.

	- Godmar


Follow-Ups: References: