diff options
author | Lang Hames <lhames@gmail.com> | 2014-01-29 18:31:35 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2014-01-29 18:31:35 +0000 |
commit | 2cbbdf41c061fff572b354ac8549432709f1fe35 (patch) | |
tree | 0814b6bfe375ef3b720b5531f1f047cdf573df78 /llvm/lib/ExecutionEngine | |
parent | 9e16c8ac8af288c739cb33bbb6e1bdf33043d60d (diff) | |
download | bcm5719-llvm-2cbbdf41c061fff572b354ac8549432709f1fe35.tar.gz bcm5719-llvm-2cbbdf41c061fff572b354ac8549432709f1fe35.zip |
Add support for PC-relative non-extern relocations to RuntimeDyldMachO.
Also replaces testcase for r180790 (support for absolute non-externs relocs)
with a more robust version.
<rdar://problem/15864721>
llvm-svn: 200404
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp index d12e7e5e4dc..0408337fff7 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp @@ -382,6 +382,8 @@ void RuntimeDyldMachO::processRelocationRef(unsigned SectionID, uint64_t Addr; Sec.getAddress(Addr); Value.Addend = Addend - Addr; + if (IsPCRel) + Value.Addend += Offset + NumBytes; } if (Arch == Triple::x86_64 && (RelType == MachO::X86_64_RELOC_GOT || |