executable RPATH question

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Fri Feb 6 09:30:51 UTC 2015


On February 6, 2015 8:23:27 AM GMT+01:00, Waldemar Brodkorb <wbx at openadk.org> wrote:
>Hi Steve,
>Steve Ellcey  wrote,
>
>> While building uclibc for MIPS I ran into the issue of whether or not
>> the dynamic linker should use an executables rpath when searching for
>> its libraries.  Apparently the glibc dynamic linker does this, but
>the
>> uclibc one does not and back when this was discussed in 2011 the
>decision
>> was made not to change the uclibc behaviour because the ELF spec does
>not
>> say that the linker should do this.
>> 
>> At the risk of of reopening a closed issue I was wondering if we
>could
>> consider putting the code to do this in under an ifdef or a config
>option
>> so that those of us who want it could have it without having to
>maintain
>> a local patch for it.  If not, I will just maintain my local patch.
>> 
>> Original discussion:
>> 
>> http://lists.uclibc.org/pipermail/uclibc/2011-September/045757.html
>
>Do you have a patch which applies to master?
>Including an option...

I still think this is wrong. Just set the RUNPATH of the first lib correctly (and fix glibc):

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_RUNPATHentry, itself. One object's DT_RUNPATHentry does not affect the search for any other object's dependencies.




More information about the uClibc mailing list