GCJ's URLClassloader and 'core' protocol

Tom Tromey tromey@redhat.com
Tue Jun 29 01:06:00 GMT 2004


>>>>> "Sal" == Sal  <gcj@svf.dreamhost.com> writes:

Sal> I haven't seen/understood much of the GCJ internals yet, but if GCJ
Sal> could just 'tag' certain classes as being loaded by a classloader
Sal> other than the system classloader, it would fix my problem.

The problems arise with the C linkage model.  You can't link in
multiple independent copies of a given symbol.

Sal> In other words a statically linked class would be internally
Sal> loaded/referenced the same way that it is now... but just made to
Sal> reference an arbitrary classloader.  Would I be wrong in guessing that
Sal> its just a pointer that needs to be set to point to a different object?

Yes, with the current ABI things like static field references are done
symbolically and fixed up by the linker (ld or ld.so).  This is not a
tweakable process, in the sense that we can't insert the class loader
in the middle of it to have it point different classes at different
locations.

Tom



More information about the Java mailing list