gcj && libjava for cygwin
Tom Tromey
tromey@redhat.com
Wed Apr 18 21:11:00 GMT 2001
>>>>> "Jeff" == Jeff Sturm <jsturm@one-point.com> writes:
>> JNI_OnLoad is a weak symbol -- see natFirstThread.cc. Shared libraries of
>> JNI code define it. Do weak symbols not work on cygwin?
Jeff> They don't. What is the proper workaround? Define a JNI_OnLoad
Jeff> stub in a static archive?
The only reason JNI_OnLoad appears in FirstThread is to support
preloading of JNI libraries. This is a libtool feature that is used
on seriously losing platforms that we probably don't support anyway.
Preloading might also be used in other situations, but I don't know.
I've never even tried to use it (which actually doesn't mean much, I'm
just saying it for dramatic effect :-)
Anyway, the point is that supporting this code isn't really a
requirement for us. Defining JNI_OnLoad in libgcj isn't what we want.
It would be better to simply not define it on Windows.
For JNI libraries loaded dynamically, we find JNI_OnLoad via a
different method. Not using this code in FirstThread won't affect
that scenario.
Tom
More information about the Cygwin-apps
mailing list