<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>My version of fix for that is D23655​. Did not do perfomance tests yet, just want to show concept first.<br>
</p>
<p><br>
</p>
<div id="Signature">
<div class="BodyFragment"><font size="2">
<div class="PlainText">Best regards,<br>
George.</div>
</font></div>
</div>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>От:</b> Rui Ueyama <ruiu@google.com><br>
<b>Отправлено:</b> 18 августа 2016 г. 4:51<br>
<b>Кому:</b> reviews+D23565+public+28ea864e67ee3b0f@reviews.llvm.org<br>
<b>Копия:</b> evgeny777; wallbraker@gmail.com; Sean Silva; llvm-commits; Davide Italiano; Ed Maste; Igor Kudrin; George Rimar; Adhemerval Zanella<br>
<b>Тема:</b> Re: [PATCH] D23565: [ELF] Linkerscript: fix relocation offsets</font>
<div> </div>
</div>
<div>
<div dir="ltr">I don't think this would slow down the relocation process because the number of function calls will be the same. A quick performance test would be appreciated, though.</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Aug 17, 2016 at 6:28 PM, Sean Silva <span dir="ltr">
<<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
silvas added a comment.<br>
<span class=""><br>
In <a href="https://reviews.llvm.org/D23565#518608" rel="noreferrer" target="_blank">
https://reviews.llvm.org/<wbr>D23565#518608</a>, @ruiu wrote:<br>
<br>
> Eugene,<br>
><br>
> Thank you for your description. I agree that the order we compute offset is the cause of the problem. In scanRelocs, we compute a symbol offset for each symbol and assign it to a local variable `Offset` -- but that value may change if linker scripts are in
 use. That value is computed too early, and we want to do it lazily.<br>
><br>
> As to this patch, I'd refactor instead of applying a quick fix. It doesn't seem hard to do. For `C.Relocations` in `scanRelocs`, we are able to not store `Offset` to them because it can be computed from `Body`.<br>
<br>
<br>
</span>This makes sense, but it may have performance implications to get the offset later (at least more pointer chasing for data that we already had in cache in scanRelocs); it will need to be measured to make sure that we implement it without costing too
 much performance.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D23565" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D23565</a><br>
<br>
<br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</body>
</html>