This is the mail archive of the java@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]
Other format: [Raw text]

solib: URL patch


I'd like to check in the solib: URL patch, but first I thought I'd
ask the list, since this is a strange sort of patch, adding somewhat
unusual functionality under the hood.

The basic idea of the patch is to add a new kind of URL, "solib:".
Accessing resources from a URL of this form causes libgcj to dlopen
the appropriate library and look inside it.  In conjunction with a
change to URLClassLoader, this makes it very easy to load classes
from shared libraries in a controlled way.

Right now there is one strange limitation of the implementation, which
is that a given shared library can only be loaded by a single class
loader at once.  Attempts to do otherwise run into failures of various
kinds.

This restriction will be lifted once we move to the new ABI.  Then we
will be able to load .so files privately (instead of RTLD_GLOBAL).

With this patch I'd also like to deprecate SharedLibLoader.  I think
the solib: URL approach is more flexible and perhaps easier to
maintain.  And, eventually, we'll be able to remove the unportable
`flags' argument to the SharedLibLoader constructor (by removing
SharedLibLoader itself).

This patch is required to get eclipse to run.  I suppose we could
investigate other avenues to make it work, but, barring some major
flaw with this, I'd really rather not.

You can see the patch here, with some additional commentary:

http://gcc.gnu.org/ml/java-patches/2003-q1/msg00177.html

There might have been a change or two since then, but nothing major.


Unless there are objections, I'll put this in on Monday or so.

Tom


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