Library problem in jni.cc on Linux

Tom Tromey tromey@redhat.com
Thu May 3 13:52:00 GMT 2001


>>>>> "Martin" == Martin Kahlert <martin.kahlert@infineon.com> writes:

Martin> The real problem seems to be the final line
Martin> return lt_dlsym (NULL, symname);
Martin> inside java/lang/natRuntime.cc:74
This is a thinko on my part. Try this patch (which I haven't even
tried to compile...).
FYI: the stuff you are doing ought to work. However it has obviously
not been used. So I'm afraid you are shaking out all the latent
bugs...
2001年05月03日 Tom Tromey <tromey@redhat.com>
	* java/lang/natRuntime.cc (init): Call add_library on the program
	itself.
	(_Jv_FindSymbolInExecutable): Return NULL if no library on the
	list has the symbol.
Tom
Index: java/lang/natRuntime.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/natRuntime.cc,v
retrieving revision 1.14.4.1
diff -u -r1.14.4.1 natRuntime.cc
--- natRuntime.cc	2001年03月12日 07:33:57	1.14.4.1
+++ natRuntime.cc	2001年05月03日 20:51:09
@@ -69,7 +69,7 @@
 	return r;
 }
 
- return lt_dlsym (NULL, symname);
+ return NULL;
 }
 
 #endif /* USE_LTDL */
@@ -191,6 +191,9 @@
 finalize_on_exit = false;
 #ifdef USE_LTDL
 lt_dlinit ();
+ lt_dlhandle self = lt_dlopen (NULL);
+ if (self != NULL)
+ add_library (self);
 #endif
 }
 


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /