<div dir="ltr">Hi William,<div><br></div><div>Daniel told me you were still hoping to land this, so I took a stab at writing a test for it and discovered that, unfortunately, RuntimeDyldELF's GOT building mechanism (which uses a separate section for GOT entries) isn't compatible with RuntimeDyldChecker.</div><div><br></div><div>The proper solution to that is to fix RuntimeDyldELF's GOT handling (it's not safe to use a separate section in general, as it may be allocated out of range of a PC-rel GOT entry load), but that's non-trivial.</div><div><br></div><div>In the mean time, since this patch doesn't change any existing behavior I've committed in r279182.</div><div><br></div><div>Cheers,</div><div>Lang.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 22, 2016 at 1:05 PM, Lang Hames 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"><div style="word-wrap:break-word">Hi Michael, William,<div><br></div><div>William - thank you very much for this!</div><div><br></div><div>If possible, could you please add an ELF test case to llvm/test/ExecutionEngine/<wbr>RuntimeDyld/ARM? There is an existing MachO test case there that may be of some help, though it does not contain any GOT relocation tests. From the x86-64 GOT test:</div><div><br></div><div><font face="Courier New"># Test PC-rel GOT relocation.<br># Verify both the contents of the GOT entry for y, and that the movq instruction<br># references the correct GOT entry address:<br># rtdyld-check: *{8}(stub_addr(test_x86-64.o, __text, y)) = y<br># rtdyld-check: decode_operand(insn3, 4) = stub_addr(test_x86-64.o, __text, y) - next_pc(insn3)<br>insn3:<br>        movq    y@GOTPCREL(%rip), %rax<br></font><br></div><div>The first test is reading the value of the stub (in this case GOT entry) for y and verifying that it contains the address of y.</div><div>The second test is verifying that the PC-relative offset for the instruction is equal to the difference between the stub address and the next instruction.</div><div><br></div><div>Cheers,</div><div>Lang.</div><span class=""><div><br></div><div><div><blockquote type="cite"><div>On Mar 22, 2016, at 12:58 PM, Michael Gottesman <<a href="mailto:mgottesman@apple.com" target="_blank">mgottesman@apple.com</a>> wrote:</div><br><div><div>I am not actually reviewing this, but just as a drive by: This is definitely going to need tests.<br><br><blockquote type="cite">On Mar 22, 2016, at 12:56 PM, Michael Gottesman via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br><br>Lang, can you take a look at this one?<br><br><blockquote type="cite">On Mar 22, 2016, at 10:59 AM, William Dillon via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br><br><llvm.patch>This change supports the swift interpreter on armv7-based linux machines.  This is required for a number of tests and the package manager.<br><br>- Will__________________________<wbr>_____________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br></blockquote><br>______________________________<wbr>_________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br></blockquote><br></div></div></blockquote></div><br></div></span></div><br>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>