This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Library problem in jni.cc on Linux
- To: martin dot kahlert at infineon dot com
- Subject: Re: Library problem in jni.cc on Linux
- From: Tom Tromey <tromey at redhat dot com>
- Date: 03 May 2001 15:04:29 -0600
- Cc: java at gcc dot gnu dot org
- References: <20010503162818.A27261@keksy.muc.infineon.com>
- Reply-To: tromey at redhat dot com
>>>>> "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
}