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

Ed Maste emaste at freebsd.org
Mon Apr 6 19:02:18 PDT 2015


On 6 April 2015 at 21:38, Rui Ueyama <ruiu at google.com> wrote:
> On Mon, Apr 6, 2015 at 6:22 PM, Ed Maste <emaste at freebsd.org> wrote:
>>
>> Good point. Do you think we should go further and either just use
>> DT_RUNPATH when we know the system's rtld supports it, or set both
>> DT_RUNPATH and DT_RPATH in all cases?
>>
>> The "broken" DT_RPATH behaviour is as specified in gabi41.pdf, but I'm
>> not sure that anyone really wants that. It seems a bit unfortunate to
>> have the sensible behaviour hidden behind an option.
>
> How about other linkers? If gold and/or GNU LD are going to switch default,
> we should follow them.

There's been discussion on enabling it by default in gold, but I
suspect it'll be hard to overcome the inertia there. I'm not sure
about GNU ld. Perhaps if we make the change they'll use it to justify
following suit :)

If the target supports DT_RUNPATH, and the target implements DT_RPATH
as specified in gABI, then I think there's no real use in setting only
DT_RPATH.

FWIW most of the libraries in /usr/local/lib on my FreeBSD 11 laptop
have both DT_RPATH and DT_RUNPATH, and they are set to the same value.



More information about the llvm-commits mailing list