Use executable's RPATH in looking up library searching path.

Filippo ARCIDIACONO filippo.arcidiacono at st.com
Tue Sep 27 12:04:27 UTC 2011


 

> -----Original Message-----
> From: vapierfilter at gmail.com [mailto:vapierfilter at gmail.com] 
> On Behalf Of Mike Frysinger
> Sent: Saturday, September 24, 2011 8:46 AM
> To: Filippo ARCIDIACONO
> Cc: uclibc at uclibc.org
> Subject: Re: Use executable's RPATH in looking up library 
> searching path.
> 
> On Fri, Sep 23, 2011 at 11:23, Filippo ARCIDIACONO wrote:
> > The ELF spec says what is the RPATH, but nothing about the dynamic 
> > linker Use the rpath in library search path.
> 
> i'm afraid this appears to be incorrect.  when i read the 
> spec, it sounds to me like the glibc behavior is wrong and 
> uClibc is right.
> 
> note that while the spec says DT_RUNPATH below and not 
> DT_RPATH, the behavior is the same in this regard.  the only 
> difference between DT_RUNPATH and DT_RPATH is precedence wrt 
> $LD_LIBRARY_PATH.
> 
> on to the spec (everything below) !

I already read this spec, but unfortunately it was very old.
I also knew that this could be solved using ldsoconfig, 
LD_LIBRARY_PATH ...., but I wonder if it could be worth fix 
in the Dynamic Linker.
Finally, I agreed with you, being also the DT_RPATH's use
superseded by DT_RUNPATH, as the spec says, the DL works fine
and the fix is useless.

> 
> http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#sho
> bj_dependencies
> 
> The set of directories specified by a given DT_RUNPATH entry 
> is used to find only the immediate dependencies of the 
> executable or shared object containing the DT_RUNPATH entry. 
> That is, it is used only for those dependencies contained in 
> the DT_NEEDED entries of the dynamic structure containing the 
> DT_RUNPATH entry, itself. One object's DT_RUNPATH entry does 
> not affect the search for any other object's dependencies.
> -mike
> 

Filippo.



More information about the uClibc mailing list