[PATCH] D19995: Optimize access to global variable references in PIE mode when linker supports copy relocations for PIE

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Sat May 7 12:40:27 PDT 2016


On Sat, May 07, 2016 at 11:52:25AM -0700, Xinliang David Li via llvm-commits wrote:
> On Sat, May 7, 2016 at 11:45 AM, Joerg Sonnenberger <joerg at netbsd.org>
> wrote:
> 
> > joerg added a comment.
> >
> > In http://reviews.llvm.org/D19995#424195, @davidxl wrote:
> >
> > > Also note this is not something new introduced by this patch. Non-pie
> > case
> > >  already does it.
> >
> >
> > One reason a  lot of OS people are pushing for PIE is to get rid of copy
> > relocations.
> 
> 
> Do you mean that the reason people using PIE is to avoid copy relocs or
> something else?  Also any references to your claim?

It is certainly one motivation for moving towards PIE, yes.

> > Again, please do not add another instance of them. The behavior can be
> > obtained without any such regressions.
> >
> 
> except that some may consider this progression, not regression.   This new
> behavior is also controllable with an option. The default setting is
> subject to debate.

Well, it certainly fits:
https://devhumor.com/content/uploads//images/July2015/bug-vs-feature.jpg

Seriously, you haven't even demonstrated that it provides an actual
performance benefit. If you want to do something useful, help making
protected usable. Copy relocations should be buried as mistake of the
past.

Joerg


More information about the llvm-commits mailing list