summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp
diff options
context:
space:
mode:
authorNick Kledzik <kledzik@apple.com>2014-09-09 23:52:59 +0000
committerNick Kledzik <kledzik@apple.com>2014-09-09 23:52:59 +0000
commit1bebb2832ee312d3b0316dacff457a7a29435edb (patch)
tree8e60f41a6649fd60850d101306b98b039857f97f /lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp
parentd0f103775a66232fae4a54fc29fdc031f3436d38 (diff)
downloadbcm5719-llvm-1bebb2832ee312d3b0316dacff457a7a29435edb.tar.gz
bcm5719-llvm-1bebb2832ee312d3b0316dacff457a7a29435edb.zip
[mach-o] Add support for arm64 (AAarch64)
Most of the changes are in the new file ArchHandler_arm64.cpp. But a few things had to be fixed to support 16KB pages (instead of 4KB) which iOS arm64 requires. In addition the StubInfo struct had to be expanded because arm64 uses two instruction (ADRP/LDR) to load a global which requires two relocations. The other mach-o arches just needed one relocation. llvm-svn: 217469
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp')
-rw-r--r--lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp b/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp
index 4713febb2ef..73f39547d03 100644
--- a/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp
+++ b/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp
@@ -185,6 +185,7 @@ const ArchHandler::StubInfo ArchHandler_x86_64::_sStubInfo = {
6,
{ 0xff, 0x25, 0x00, 0x00, 0x00, 0x00 }, // jmp *lazyPointer
{ Reference::KindArch::x86_64, ripRel32, 2, 0 },
+ { false, 0, 0, 0 },
// Stub Helper size and code
10,
@@ -200,7 +201,9 @@ const ArchHandler::StubInfo ArchHandler_x86_64::_sStubInfo = {
0xFF, 0x25, 0x00, 0x00, 0x00, 0x00, // jmp *binder(%rip)
0x90 }, // nop
{ Reference::KindArch::x86_64, ripRel32, 3, 0 },
- { Reference::KindArch::x86_64, ripRel32, 11, 0 }
+ { false, 0, 0, 0 },
+ { Reference::KindArch::x86_64, ripRel32, 11, 0 },
+ { false, 0, 0, 0 }
};
OpenPOWER on IntegriCloud