<div dir="ltr">Hi Keno,<div><br></div><div>This sounds great. Sorry for the delay in review - I'm hoping to get to them very soon (i.e. in a day or two).</div><div><br></div><div>Cheers,</div><div>Lang.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 2, 2015 at 6:44 PM, Keno Fischer <span dir="ltr"><<a href="mailto:kfischer@college.harvard.edu" target="_blank">kfischer@college.harvard.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi lhames,<br>
<br>
This is the first in a series of patches to eventually add support for TLS relocations to RuntimeDyld. This patch resolves an issue in the current GOT handling, where GOT entries would be reused between object files, which leads to the same situation that necessitates the GOT in the first place, i.e. that the 32-bit offset can not cover all of the address space. Thus this patch makes the GOT object-file-local.<br>
Unfortunately, this still isn't quite enough, because the MemoryManager does not yet guarantee that sections are allocated sufficiently close to each other, even if they belong to the same object file. To address this concern, this patch also adds a small API abstraction on top of the GOT allocation mechanism that will allow (temporarily, until the MemoryManager is improved) using the stub mechanism instead of allocating a different section. The actual switch from separate section to stub mechanism will be part of a follow-on commit, so that it can be easily reverted independently at the appropriate time.<br>
<br>
REPOSITORY<br>
  rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D8813" target="_blank">http://reviews.llvm.org/D8813</a><br>
<br>
Files:<br>
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp<br>
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h<br>
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp<br>
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h<br>
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h<br>
  test/ExecutionEngine/MCJIT/cross-module-sm-pic-a.ll<br>
  test/ExecutionEngine/RuntimeDyld/X86/ELF_x64-64_PIC_relocations.s<br>
  test/ExecutionEngine/RuntimeDyld/X86/ExternalGlobal.ll<br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
</blockquote></div><br></div>