<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 7, 2016 at 12:40 PM, Joerg Sonnenberger via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sat, May 07, 2016 at 11:52:25AM -0700, Xinliang David Li via llvm-commits wrote:<br>
> On Sat, May 7, 2016 at 11:45 AM, Joerg Sonnenberger <<a href="mailto:joerg@netbsd.org">joerg@netbsd.org</a>><br>
> wrote:<br>
><br>
> > joerg added a comment.<br>
> ><br>
> > In <a href="http://reviews.llvm.org/D19995#424195" rel="noreferrer" target="_blank">http://reviews.llvm.org/D19995#424195</a>, @davidxl wrote:<br>
> ><br>
> > > Also note this is not something new introduced by this patch. Non-pie<br>
> > case<br>
> > >  already does it.<br>
> ><br>
> ><br>
> > One reason a  lot of OS people are pushing for PIE is to get rid of copy<br>
> > relocations.<br>
><br>
><br>
> Do you mean that the reason people using PIE is to avoid copy relocs or<br>
> something else?  Also any references to your claim?<br>
<br>
</span>It is certainly one motivation for moving towards PIE, yes.<br></blockquote><div><br></div><div>why? Will -fpic -pie work in this case to avoid using copy relocs?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> > Again, please do not add another instance of them. The behavior can be<br>
> > obtained without any such regressions.<br>
> ><br>
><br>
> except that some may consider this progression, not regression.   This new<br>
> behavior is also controllable with an option. The default setting is<br>
> subject to debate.<br>
<br>
</span>Well, it certainly fits:<br>
<a href="https://devhumor.com/content/uploads//images/July2015/bug-vs-feature.jpg" rel="noreferrer" target="_blank">https://devhumor.com/content/uploads//images/July2015/bug-vs-feature.jpg</a><br>
<br>
Seriously, you haven't even demonstrated that it provides an actual<br>
performance benefit. If you want to do something useful, help making<br>
protected usable. Copy relocations should be buried as mistake of the<br>
past.<br></blockquote><div><br></div><div>There are certainly performance gains from this. If you don't believe it, you can try turn of copyreloc for non-pie builds to see what will be affected. This is one of the main cause of slow down when PIE is turned on for security hardening -- YMMV, but we've seen up to 4% IIRC.</div><div><br></div><div>David</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Joerg<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>