[RuntimeDyld] Fix resolving R_PPC64_REL24 relocations
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 17 Nov 2015 20:08:31 +0000 (20:08 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 17 Nov 2015 20:08:31 +0000 (20:08 +0000)
commite570abc428db5f78f839040f164dd6f6e8a3c6c0
treecd0d8d264403f441a65e3e5aed34298b2d83c608
parentf42fd78674f14b062d7481a51283d956faaccdb1
[RuntimeDyld] Fix resolving R_PPC64_REL24 relocations

When resolving R_PPC64_REL24, code used to check for an address delta
that fits in 24 bits, while the instructions that take this relocation
actually can process address deltas that fit into *26* bits (as those
instructions have a 24 bit field, but implicitly append two zero bits
at the end since all instruction addresses are a multiple of 4).

This means that code would signal overflow once a single object's text
section exceeds 8 MB, while we can actually support up to 32 MB.

Partially fixes PR25540.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253369 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp