This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Problem with linker with binutils-040414
> > I was using a version ld that I build several weeks ago from the cvs
> > source (don't know the exact date), and that works fine.
> # ./ld -V
Version that works fine:
GNU ld version 2.15.90 20040303
> It looks like old_bfd is NULL, which isn't supposed to happen. Can
> you find out why old_bfd is NULL at elflink.c:3641? We need a testcase.
> You can print out what `h' points to at elflink.c:3641 and find out
> where the symbol is defined and referenced. You should be able to
> construct a very small testcase from there.
I now have a very small test case assuming you have a java JDK installed.
test.cxx:
#include <jni.h>
int main (int argc, char *argv[])
{
}
Command line to build:
g++ -I/opt/jdk1.4.2/include -I/opt/jdk1.4.2/include/linux tmp.cxx \
-L/opt/jdk1.4.2/jre/lib/i386/client -ljvm
It looks like it's having some sort of issue with the shared libraries
that Sun ships with the JDKs. The libraries from the blackdown 1.4.1
jdk work fine. I tried Sun's 1.3.1, 1.4.2, 1.4.1, and 1.4.0_02. They
all have the same error. Obviously, I cannot rebuild the Sun stuff so
fixing the linker is the only real option. With my little "null check"
fix, I consistently get the warnings:
/usr/bin/ld: Warning: size of symbol `getrlimit@GLIBC_2.0' changed from 59
in (null) to 62 in /lib/libc.so.6
/usr/bin/ld: Warning: size of symbol `realpath@GLIBC_2.0' changed from 54
in (null) to 66 in /lib/libc.so.6
/usr/bin/ld: Warning: size of symbol
`pthread_kill_other_threads_np@GLIBC_2.0' changed from 141 in (null) to 5
in /lib/libpthread.so.0
(BTW: I'm trying to compile/link a bunch of JNI code so I need to link
with the jvm)
Thanks!
--
J. Daniel Kulp
dan@kulp.com