On Mon, Aug 19, 2002 at 02:41:44PM +0200, Marcelo E. Magallon wrote: > >> "Marcelo E. Magallon" <[EMAIL PROTECTED]> writes: > > Just the normal linker with a different set of default paths. This > > is like using an -rpath. The problem with -rpath is that it has > > precedence over LD_LIBRARY_PATH. So, the simplest solution is for > > g++-3.2 to indicate a different dynamic linker when linking > > programs. > > The problem with this solution is that it's not particularly backwards > compatible. Systems without this special linker won't be able to run > the binaries, which is a *big* problem.
Yes ... > Fiddling arround the ld.so sources to understand how if finds the > libraries it wants to use, I noticed it looks for two tags in the ELF > object: DT_RPATH and DT_RUNPATH. RUNPATH has two nice poperties: it's > looked at *after* LD_LIBRARY_PATH and it doesn't contaminate other ELF > objects, that is, it affects *only* the lookup process for the current > ELF object (that's the documented behaviour at least, I have yet to > check that ld.so does indeed behave like this). That could be interesting. How far back is RUNPATH supported? (I seem to recall that it's a relatively new introduction to ELF, but if it's in stable then that's good enough for me.) -- Colin Watson [EMAIL PROTECTED]