This is the mail archive of the 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


Linking programs against a new glibc seems to be done like this:
> ... just link your programs with:
> -Wl,-dynamic-linker,/newglibc/lib/ -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/ undefined reference to '_dl_out_of_memory@GLIBC_PRIVATE'

Using the --verbose option of ld, we can see: needed by /lib/
found at /newglibc/lib/

The original tries to use the new, resulting in an 
error. If I temporarily "remove" the new during the 
compilation, the problem disappears (the original is found). 
Actually, 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?


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