[PATCH] [GNU] Implement --enable-new-dtags/--disable-new-dtags

Ed Maste emaste at freebsd.org
Mon Apr 6 18:55:45 PDT 2015


On 6 April 2015 at 21:51, Saleem Abdulrasool <compnerd at compnerd.org> wrote:
>
> No, setting both would mean that you still have DT_RPATH, which means that
> LD_LIBRARY_PATH is no longer honored.  I think that would be detrimental to
> the use of the flag in the first place.

No, if you have DT_RUNPATH then DT_RPATH is completely ignored.
FreeBSD's rtld(1) gives this order of precedence:

           1.   DT_RPATH of the referencing object unless that object also
                contains a DT_RUNPATH tag
           2.   DT_RPATH of the program unless the referencing object contains
                a DT_RUNPATH tag
           3.   Path indicated by LD_LIBRARY_PATH environment variable
           4.   DT_RUNPATH of the referencing object
           5.   Hints file produced by the ldconfig(8) utility
           6.   The /lib and /usr/lib directories, unless the referencing
                object was linked using the ``-z nodefaultlib'' option

I believe this is consistent with the gABI and is what the Linux rtld does too.



More information about the llvm-commits mailing list