[lld] r247475 - Implement -rpath.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 05:28:02 PDT 2015


If both DT_RPATH and DT_RUNPATH entries appear in a single object's
dynamic array, the dynamic linker processes only the DT_RUNPATH entry.

form http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#dynamic_section

On 14 September 2015 at 05:39, Joerg Sonnenberger via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> On Sun, Sep 13, 2015 at 10:09:45PM -0400, Ed Maste wrote:
>> On 13 September 2015 at 19:49, Hal Finkel via llvm-commits
>> <llvm-commits at lists.llvm.org> wrote:
>> > ----- Original Message -----
>> >> From: "Joerg Sonnenberger via llvm-commits" <llvm-commits at lists.llvm.org>
>> >> To: "llvm-commits" <llvm-commits at lists.llvm.org>
>> >> Sent: Sunday, September 13, 2015 4:25:26 PM
>> >> Subject: Re: [lld] r247475 - Implement -rpath.
>> >>
>> >> On Sun, Sep 13, 2015 at 02:56:44PM -0500, Hal Finkel wrote:
>> >> > Just to confirm, generating both DT_RPATH and DT_RUNPATH is a
>> >> > reasonable option for NetBSD and older FreeBSD systems?
>> >>
>> >> NetBSD completely ignores DT_RUNPATH. But providing both wouldn't be
>> >> an
>> >> option for systems that moved to the broken DT_RPATH behavior.
>> >
>> > What do you mean? On the systems that support both, DT_RPATH is ignored when DT_RUNPATH is present, right? Or is this not always true?
>>
>> As far as I know this is the case. The default toolchain on FreeBSD
>> currently emits binaries with both, and DT_RPATH is indeed ignored
>> when DT_RUNPATH is present.
>>
>> Joerg, are you aware of systems that "moved to" the silly (but
>> documented) DT_RPATH behaviour? My understanding is that a number of
>> systems implemented the silly behaviour from the beginning, and later
>> introduced DT_RUNPATH to fix that.
>
> I don't see anything in the standards that would recomment ignoring the
> DT_RPATH, but I might be wrong.
>
> Joerg
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list