<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 6, 2016 at 12:42 PM, Joerg Sonnenberger <span dir="ltr"><<a href="mailto:joerg@netbsd.org" target="_blank">joerg@netbsd.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">joerg added a subscriber: joerg.<br>
joerg added a comment.<br>
<br>
This looks like a huge step in the wrong direction to me. Copy relocations are one of the worst misfeatures of ELF.</blockquote><div><br></div><div>You have an interesting opinion here. Copyreloc is of course not without its own problems, but it is effective and is already adopted by for non-PIE build which performance critical programs need.    Note that this patch is just an incremental change.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Please do not add any new dependencies.<br>
<br>
That said, if the original motivation is simplifying access to variables of the main program (not in shared libraries), the linker can already optimize them.<br>
<br><br></blockquote><div><br></div><div>At the cost of larger instruction footprint and waste of icache which is precious.</div><div><br></div><div>Having said that, with LTO or ThinLTO, the compiler should be able do get it right and know where the globals are defined.</div><div><br></div><div>David</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="http://reviews.llvm.org/D19995" rel="noreferrer" target="_blank">http://reviews.llvm.org/D19995</a><br>
<br>
<br>
<br>
</blockquote></div><br></div></div>