]> granicus.if.org Git - llvm/commit
[RuntimeDyld, PowerPC] Fix check for external symbols when detecting reloction overflow
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 23 May 2017 14:51:18 +0000 (14:51 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 23 May 2017 14:51:18 +0000 (14:51 +0000)
commit07df6a5507ceae24156cbe9eb6b9fba66c5168e6
tree4c9049b67f6f0e0f4ac8eba426dd80ef4f8244a5
parent0dae0619be05d846fac03553775f252750a7946a
[RuntimeDyld, PowerPC] Fix check for external symbols when detecting reloction overflow

The PowerPC part of processRelocationRef currently assumes that external
symbols can be identified by checking for SymType == SymbolRef::ST_Unknown.
This is actually incorrect in some cases, causing relocation overflows to
be mis-detected. The correct check is to test whether Value.SymbolName
is null.

Includes test case. Note that it is a bit tricky to replicate the exact
condition that triggers the bug in a test case. The one included here
seems to fail reliably (before the fix) across different operating
system versions on Power, but it still makes a few assumptions (called
out in the test case comments).

Also add ppc64le platform name to the supported list in the lit.local.cfg
files for the MCJIT and OrcMCJIT directories, since those tests were
currently not run at all.

Fixes PR32650.

Reviewer: hfinkel

Differential Revision: https://reviews.llvm.org/D33402

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303637 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
test/ExecutionEngine/MCJIT/lit.local.cfg
test/ExecutionEngine/OrcMCJIT/lit.local.cfg
test/ExecutionEngine/OrcMCJIT/pr32650.ll [new file with mode: 0644]