Patch: register all loaded libraries
Tom Tromey
tromey@cygnus.com
Wed Feb 9 16:15:00 GMT 2000
I'm checking in the appended patch. It fixes an oversight from an
earlier JNI patch; now all dynamically loaded libraries are correctly
registered.
2000-02-09 Tom Tromey <tromey@cygnus.com>
* java/lang/natRuntime.cc (_load): Call add_library.
(loadLibraryInternal): Likewise.
Tom
Index: java/lang/natRuntime.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/natRuntime.cc,v
retrieving revision 1.7
diff -u -r1.7 natRuntime.cc
--- natRuntime.cc 2000/02/08 00:26:58 1.7
+++ natRuntime.cc 2000/02/10 00:15:11
@@ -119,6 +119,8 @@
_Jv_Throw (new UnsatisfiedLinkError (JvNewStringLatin1 (msg)));
}
+ add_library (h);
+
void *onload = lt_dlsym (h, "JNI_OnLoad");
if (onload != NULL)
{
@@ -150,6 +152,8 @@
buf[total] = '\0';
// FIXME: make sure path is absolute.
lt_dlhandle h = lt_dlopenext (buf);
+ if (h != NULL)
+ add_library (h);
return h != NULL;
#else
return false;
More information about the Java-patches
mailing list