This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: patches to re-direct _Jv_RegisterClass


Tom Tromey <tromey@redhat.com> writes:

> Per> A model closer to Sun's extensions mechanism would be to just
> Per> search $prefix/share/gcj/*.jar, if it hasn't already been
> Per> registered.
> 
> I don't follow.  We're loading .so's, not .jar's.  We could load every
> .so we find, looking for the symbol.  However, that is probably very
> expensive.

My feeling is that trying to tie .so files too closely to the
package hierarchy will be difficult.  Instead, I think we should
tie .so files and .jar files together - they are both "libraries".
So for every .jar file installed in the appropriate "extensions"
directory there should be a matching .so file in a "library" directory,
with the corresponding name (including version number).

So we solve the problem of knowing which .so libraries we need to
search at run-time by looking at where we found things at compile-time.
I.e. if the compiler emits a reference to an external symbol in class
found in FOO-VER.jar, then it causes the compiled code to automatically
load FOO-VER.so.  I understand ELF has a machanism for this.  Viola,
no run-time searching of libraries needed.

I've written about this idea a number of times.  Perhaps I need to write
up a detailed spec.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]