Core dump (Illegal instruction) with crosstool's GCJ

Daniel Kegel
Wed Jun 16 20:26:00 GMT 2004

Martin Egholm Nielsen wrote:
> Hi there (Dan, I presume (o:),


> I've been doing tests with crosstools' GCJ for the last couple of weeks, 
> and now I have unfortunately run into some problems.
> 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 and
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.)  It's worth fixing.

> 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 ( specific for my PPChameleonEVB-board.

So you're having trouble only on the ppc405, eh?
And it happens regardless of the build system type,
and regardless of the glibc version?  It does rather
sound like a gcj bug.

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.

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.

Good luck, and keep us posted!
- Dan

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list