[RuntimeDyld][PowerPC] Use global entry points for calls between sections.
authorLang Hames <lhames@gmail.com>
Thu, 5 Apr 2018 19:37:05 +0000 (19:37 +0000)
committerLang Hames <lhames@gmail.com>
Thu, 5 Apr 2018 19:37:05 +0000 (19:37 +0000)
commit7a598477aaf742ab4c771be79d532fd2dfc87fbe
treebfe2c4b117ee5e9707d60a395e3f1b58306d5f8e
parent176c3efa0ec876b748fe5c44ad431b1fec97537b
[RuntimeDyld][PowerPC] Use global entry points for calls between sections.

Functions in different objects may use different TOCs, so calls between such
functions should use the global entry point of the callee which updates the
TOC pointer.

This should fix a bug that the Numba developers encountered (see
https://github.com/numba/numba/issues/2451).

Patch by Olexa Bilaniuk. Thanks Olexa!

No RuntimeDyld checker test case yet as I am not familiar enough with how
RuntimeDyldELF fixes up call-sites, but I do not want to hold up landing
this. I will continue to work on it and see if I can rope some powerpc
experts in.

llvm-svn: 329335
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp