This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: FYI: Fix pr11951 JNI test case
- From: Bryce McKinlay <mckinlay at redhat dot com>
- To: Ranjit Mathew <rmathew at gmail dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: Thu, 06 May 2004 10:50:41 -0400
- Subject: Re: Patch: FYI: Fix pr11951 JNI test case
- References: <409955D0.3050000@redhat.com> <4099D03E.70101@gmail.com>
Ranjit Mathew wrote:
I don't know whether this is an intended shortcut to
avoid having to write System.loadLibrary() calls in the
testcases or whether this is an oversight/bug.
Aha. That makes sense, since the problem showed up when trying to run
the test cases in the interpreter.
What I don't understand is why the linker would leave
a reference to libpr11951.so even though nothing gets
linked in from there (or does it?) - this can be verified
by an "ldd" on the "a.out" created by adding
"-L. -lpr11951".
With ELF, when you "-l" a shared library, the linker just checks for
missing symbols and adds the dependency on the .so. All the symbols are
looked up globally at runtime based on the order of the dependencies.
Regards
Bryce