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

Mike Frysinger vapier at gentoo.org
Sat Sep 24 06:45:50 UTC 2011


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) !

http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#shobj_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


More information about the uClibc mailing list