This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcj && libjava for cygwin
- To: Jeff Sturm <jsturm at one-point dot com>
- Subject: Re: gcj && libjava for cygwin
- From: Tom Tromey <tromey at redhat dot com>
- Date: 18 Apr 2001 22:23:08 -0600
- Cc: Anthony Green <green at redhat dot com>, "Billinghurst, David (CRTS)" <David dot Billinghurst at riotinto dot com>, "'Robert Collins'" <robert dot collins at itdomain dot com dot au>, java at gcc dot gnu dot org, cygwin-apps at sources dot redhat dot com
- References: <Pine.LNX.4.10.10104181511570.14265-100000@one-point.bright.net>
- Reply-To: tromey at redhat dot com
>>>>> "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