Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com List-Subscribe: List-Archive: List-Post: List-Help: , Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com To: Jeff Sturm Cc: Anthony Green , "Billinghurst, David (CRTS)" , "'Robert Collins'" , java AT gcc DOT gnu DOT org, cygwin-apps AT sources DOT redhat DOT com Subject: Re: gcj && libjava for cygwin References: X-Zippy: Actually, what I'd like is a little toy spaceship!! X-Attribution: Tom Reply-To: tromey AT redhat DOT com From: Tom Tromey Date: 18 Apr 2001 22:23:08 -0600 In-Reply-To: Jeff Sturm's message of "Wed, 18 Apr 2001 15:21:05 -0400 (EDT)" Message-ID: <87hezlcyc3.fsf@creche.redhat.com> Lines: 25 X-Mailer: Gnus v5.7/Emacs 20.5 >>>>> "Jeff" == Jeff Sturm 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