[Bug libgcj/24616] linking BC-compiled classes: NoClassDefFoundErrors should be deferred

thebohemian at gmx dot net gcc-bugzilla@gcc.gnu.org
Tue Nov 1 19:32:00 GMT 2005



------- Comment #1 from thebohemian at gmx dot net  2005-11-01 19:32 -------
Created an attachment (id=10103)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10103&action=view)
A test for the linking mechanism

This is a slightly bigger test for the linking mechanism. Unpack the tar.bz2,
put gcj4 in your path and run make.

How does it work:
- there is a single source file which contains 4 classes. After the compilation
to bytecode the file test/linker/TestClass.class is removed.
- a jar is created from the remaining classes
- a shared object is compiled from the jar
- a gcjdb file is created
- the classes in the jar are registered in the db file

If everything is fine then run the shell script:
bc-run.sh

You will see that gij fails to load and execute the main class. On Sun (can be
invoked by nf-run.sh if 'java' runs the proprietary VM) java the test will
succeed. The test contains some expected failures as well as situations where
no error happens although variables of the missing class test.linker.TestClass
are involved.

As a bonus there is a setup for gij in interpreted mode. This is for another
PR.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24616



More information about the Gcc-bugs mailing list