This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

Re: using different ld-linux.so.2


Hello,

Linking programs against a new glibc seems to be done like this:
> ... just link your programs with:
> -Wl,-dynamic-linker,/newglibc/lib/ld-linux.so.2 -Wl,-rpath,/newglibc/lib

I tried this with several glibc 2.3.x on systems running glibc 2.3.y without 
any problems. But with glibc 2.4 on a system running glibc 2.3.5, I obtain 
the following linker error:
/lib/libc.so.6: undefined reference to '_dl_out_of_memory@GLIBC_PRIVATE'

Using the --verbose option of ld, we can see:
ld-linux.so.2 needed by /lib/libc.so.6
found ld-linux.so.2 at /newglibc/lib/ld-linux.so.2

The original libc.so.6 tries to use the new ld-linux.so.2, resulting in an 
error. If I temporarily "remove" the new ld-linux.so.2 during the 
compilation, the problem disappears (the original ld-linux.so.2 is found). 
Actually, ld-linux.so.2 seems to be firstly searched in directories listed in 
rpath. But rpath should not be used by the linker to search anything (it's
just the RUNTIME library search path of the created executable).

Am I missing something? Is this ld behaviour "correct"?  Should I ask on the 
binutils mailing list?

Thanks...
Guillaume


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