This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
ld core dumps on -export-dynamic
- From: "Erik Poupaert" <erik dot poupaert at chello dot be>
- To: <java at gcc dot gnu dot org>
- Date: Sat, 8 Mar 2003 23:10:00 +0100
- Subject: ld core dumps on -export-dynamic
I'm working on gcj version 3.3 20030306 (prerelease) on RH8.0.
"ld" is version 2.13.90.0.2 20020802. (does anybody know if it is compatible
with the version of gcj above?)
When I invoke gcj with "-export-dynamic", "ld" dumps core. The core dump
says: "ld terminated with signal 11 [Segmentation fault], core dumped"
When linked with "-export-dynamic -s", it doesn't dump core, but then ltdl
fails to find the jni symbols in the executable:
exception in thread "main" java.lang.UnsatisfiedLinkError: gtk_set_locale
at _Jv_LookupJNIMethod(/usr/lib/libgcj.so.4.0.0)
at gnu.gcj.runtime.FirstThread.call_main() ...
"gtk_set_locale" is indeed one the the native methods defined in
org.eclipse.swt.internal.gtk.OS.java, that should be found by ltdl. Does
anybody know how I should compile/link on linux for ltdl to find the jni
symbols in the executable itself?
If I compile without "-export-dynamic" it still dumps core. Only "-s" seems
to save the day :)
By the way, I can see that swt-xxx.so is built with "-ldl" and "-lm". Does
anybody know the meaning of it? Is it needed, when I put the jni objects in
the executable? It doesn't seem to change anything when I leave it out/leave
it in?