X86: handle external tail calls in Windows JIT
authorSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 14 Jul 2016 17:27:06 +0000 (17:27 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 14 Jul 2016 17:27:06 +0000 (17:27 +0000)
commit0233cc55dea5e55fe2163fa1e3ac5e2aee30342c
tree4a816e072292f0d6beeed6c9bccf60ba7d03a864
parentefbf9c8d5a338488c68782f06e41f21fddf7b36a
X86: handle external tail calls in Windows JIT

If there was a tail call, we would incorrectly handle the relocation.  It would
end up indexing into the array with an incorrect section id.  The symbol was
external to the module, so the Section ID was UNDEFINED (-1).  We would then
index the SmallVector with this ID, triggering an assertion.  Use the Value
rather than the section load address in this case.

llvm-svn: 275442
llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h
llvm/test/ExecutionEngine/RuntimeDyld/X86/COFF_i386.s