[RuntimeDyld] Fix x86-64 MachO GOT relocation handling.
authorLang Hames <lhames@gmail.com>
Mon, 19 May 2014 19:21:25 +0000 (19:21 +0000)
committerLang Hames <lhames@gmail.com>
Mon, 19 May 2014 19:21:25 +0000 (19:21 +0000)
commitb96f71fed63641165462e05cf3ecf5012122afa1
tree1e5cdd4b0f8f5b9022ddf237bdbc34fb71ea9491
parent8ad418b61b53a619bf9dd954c5399b69b7d78a96
[RuntimeDyld] Fix x86-64 MachO GOT relocation handling.

For GOT relocations the addend should modify the offset to the
GOT entry, not the value of the entry itself. Teach RuntimeDyldMachO
to do The Right Thing here.

Fixes <rdar://problem/16961886>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209154 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
test/ExecutionEngine/RuntimeDyld/Inputs/x86_64_macho_pic_globals_GOT.o [new file with mode: 0644]
test/ExecutionEngine/RuntimeDyld/arm_secdiff_reloc.test [deleted file]
test/ExecutionEngine/RuntimeDyld/macho_relocations.test [new file with mode: 0644]