Core dump (Illegal instruction) with crosstool's GCJ

Martin Egholm Nielsen martin@egholm-nielsen.dk
Thu Jun 17 09:28:00 GMT 2004


Hi Dan,

>> Until recently I only had problems when I trying to compile any small 
>> Java-source with "-static". Applications linked like that wouldn't 
>> execute on the target and would cause a core dump immediately after 
>> start (signal 4, Illegal instruction).
> Please check http://gcc.gnu.org/ml/java/ and http://gcc.gnu.org/bugzilla/
> to see if similar problems have been reported there.  If not,
> go ahead and report it (either place is fine; maybe informally on
> the mailing list, then if that doesn't work, formally in the bug tracking
> system.)  
I've checked the archives, and cannot find anything resembling it...

 > It's worth fixing.
Indeed it is...

Overnight I've compiled crosstool with gcc-3.3.3-glibc-2.2.5.dat for 
ppc405, and now I can actually make static-linked programs. However, the 
faulty application is still faulty....

>> However, now I've have a small test-example (dynamically linked) using 
>> the java.lang.reflect.Proxy-class, that'll fail consequently (Illegal 
>> instruction) performing some specific Java-action.
>> I've tried the same application with gcj-3.4 under MinGW and gcj-3.3.1 
>> under Cygwin, and here it works.
>> Any ideas to how to overcome this problem?
>> The crosscompiler has been build on cygwin with crosstool-0.28-rc13 
>> with the for the ppc405-target with gcc-3.4.0-glibc-2.2.5.dat.
>> A similar compiler has been created under my RedHat, and also a 
>> cygwin-compiler with glibc-2.3.2.
>> The target system runs the a root-filesystem from ELDK 2.0.2 (or maybe 
>> 2.2.0) from Denx Software, and the kernel is a patched 2.4.20 from 
>> DAVE (http://www.dave-tech.it/) specific for my PPChameleonEVB-board.
> So you're having trouble only on the ppc405, eh?
Yes...

> And it happens regardless of the build system type,
> and regardless of the glibc version?  
Well, I have only tested it on my RedHat and in my Cygwin, and with 
glibc-2.2.5 with both, but only glibc-2.3.2 from Cygwin.
I've then copied the entire lib-directory from crosstool onto target 
(NFS) and set LD_LIBRARY_PATH when trying to execute the gcj-applications.
As mentioned in another thread, I haven't been able to recompile my 
kernel with crosstool, so I don't hope that matters.

> It does rather sound like a gcj bug.
I'm not able to tell where the bug may be...
Can the core-dump be of any help? Any commands I can issue in gdb 
that'll say anything usefull?

> It might be worth verifying that the bug happens even if you
> compile the java source using sun's compiler, and then just
> use gcj to compile the .jar file.  This will help isolate
> the problem.
I've tried compiling the source with both Sun's compiler, and IBM's 
compiler from Eclipse. This makes no difference...

> Once you've done that, the best thing is probably to submit a bug report.
> In both cases please attach the source code in question
> trimmed down to the bone (the smaller the better, no extra
> prints if possible) so the resulting assembly is easier to read.
I'll do that...

Best regards,
  Martin



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list