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


>>>>> "Per" == Per Bothner <per@bothner.com> writes:

Per> So we solve the problem of knowing which .so libraries we need to
Per> search at run-time by looking at where we found things at
Per> compile-time.

But in this case we're loading classes based on something like
`Class.forName("foo")'.  There is no compile time lookup for the
caller.  There are no external references either.  For instance, we
would use this mechanism when loading the AWT peers.

Per> I.e. if the compiler emits a reference to an external symbol in
Per> class found in FOO-VER.jar, then it causes the compiled code to
Per> automatically load FOO-VER.so.  I understand ELF has a machanism
Per> for this.  Viola, no run-time searching of libraries needed.

In this sort of case you'd probably just link against the .so using
`-l'.  And if you built a .so that depends on another .so, then you'd
use the ELF trick to automatically load the dependencies.

Tom


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