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

Joerg Sonnenberger joerg at britannica.bec.de
Tue Apr 7 04:23:51 PDT 2015


On Mon, Apr 06, 2015 at 09:22:11PM -0400, Ed Maste wrote:
> On 6 April 2015 at 17:23, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:
> > On Mon, Apr 06, 2015 at 02:15:58PM -0700, Rui Ueyama wrote:
> >> Anyways, my point is that the change to the linker for this feature might
> >> be trivial, so it'd be easy to understand what is done here. But it would
> >> not help readers of the code understand why we want to do that. So I wanted
> >> to add a comment on that (a brief comment should suffice).
> >
> > I fully agree on that. First time I saw the option was like "WTF do they
> > need this?"
> 
> 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?

That's good question. For NetBSD at least, we never bothered to add
DT_RUNPATH as it would be redundant to DT_RPATH. We might add the
aliases in the future. Adding both to every binary would increase the
size and startup cost for no good reason, that sounds worse.

Joerg



More information about the llvm-commits mailing list