summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2017-08-09 20:19:27 +0000
committerLang Hames <lhames@gmail.com>2017-08-09 20:19:27 +0000
commit14a22a442d8aa6bee8c828872b82b7dd722dc7b8 (patch)
treedf3669f3e144a69fb5766c7eac17dfe07e8a2c0f /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
parent7d928cc596bdfe3c0f8b60e9a5c605d1b0f4cec2 (diff)
downloadbcm5719-llvm-14a22a442d8aa6bee8c828872b82b7dd722dc7b8.tar.gz
bcm5719-llvm-14a22a442d8aa6bee8c828872b82b7dd722dc7b8.zip
[RuntimeDyld][ORC] Add support for Thumb mode to RuntimeDyldMachOARM.
This patch adds support for thumb relocations to RuntimeDyldMachOARM, and adds a target-specific flags field to JITSymbolFlags (so that on ARM we can record whether each symbol is Thumb-mode code). RuntimeDyldImpl::emitSection is modified to ensure that stubs memory is correctly aligned based on the size returned by getStubAlignment(). llvm-svn: 310517
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
index 80e9c7ac18a..b0561f68edb 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
@@ -55,7 +55,8 @@ Expected<relocation_iterator>
RuntimeDyldMachO::processScatteredVANILLA(
unsigned SectionID, relocation_iterator RelI,
const ObjectFile &BaseObjT,
- RuntimeDyldMachO::ObjSectionToIDMap &ObjSectionToID) {
+ RuntimeDyldMachO::ObjSectionToIDMap &ObjSectionToID,
+ bool TargetIsLocalThumbFunc) {
const MachOObjectFile &Obj =
static_cast<const MachOObjectFile&>(BaseObjT);
MachO::any_relocation_info RE =
@@ -85,6 +86,7 @@ RuntimeDyldMachO::processScatteredVANILLA(
Addend -= SectionBaseAddr;
RelocationEntry R(SectionID, Offset, RelocType, Addend, IsPCRel, Size);
+ R.IsTargetThumbFunc = TargetIsLocalThumbFunc;
addRelocationForSection(R, TargetSectionID);
OpenPOWER on IntegriCloud