From 5d10284238bdc0e79771cad48f622cc26aabf0e8 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Sat, 12 Jul 2014 00:16:47 +0000 Subject: [PATCH] [RuntimeDyld] Fix stub size and offset for AArch64 in RuntimeDyldMachO.h. llvm-svn: 212864 --- llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h index 35f0720..24dc567 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h @@ -16,7 +16,6 @@ #include "ObjectImageCommon.h" #include "RuntimeDyldImpl.h" -#include "llvm/ADT/IndexedMap.h" #include "llvm/Object/MachO.h" #include "llvm/Support/Format.h" @@ -56,11 +55,20 @@ private: return 8; // 32-bit instruction and 32-bit address else if (Arch == Triple::x86_64) return 8; // GOT entry + else if (Arch == Triple::arm64) + return 8; // GOT entry else return 0; } - unsigned getStubAlignment() override { return 1; } + unsigned getStubAlignment() override { + if (Arch == Triple::arm || Arch == Triple::thumb) + return 4; + else if (Arch == Triple::arm64) + return 8; + else + return 1; + } relocation_iterator processSECTDIFFRelocation( unsigned SectionID, -- 2.7.4