From a634d0a57046c4045c746021553d11fc0caeecb4 Mon Sep 17 00:00:00 2001 From: Christian Pirker Date: Wed, 26 Mar 2014 14:57:32 +0000 Subject: AArch64_BE Elf support for MC-JIT runtime dynamic linker git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204816 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp | 2 +- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 1 + lib/MC/MCObjectFileInfo.cpp | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp index b28a312f74..7f35083748 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp @@ -490,7 +490,7 @@ void RuntimeDyldImpl::addRelocationForSymbol(const RelocationEntry &RE, } uint8_t *RuntimeDyldImpl::createStubFunction(uint8_t *Addr) { - if (Arch == Triple::aarch64) { + if (Arch == Triple::aarch64 || Arch == Triple::aarch64_be) { // This stub has to be able to access the full address space, // since symbol lookup won't necessarily find a handy, in-range, // PLT stub for functions which could be anywhere. diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index 861c9beb1e..3b400690eb 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -844,6 +844,7 @@ void RuntimeDyldELF::resolveRelocation(const SectionEntry &Section, (uint32_t)(Addend & 0xffffffffL)); break; case Triple::aarch64: + case Triple::aarch64_be: resolveAArch64Relocation(Section, Offset, Value, Type, Addend); break; case Triple::arm: // Fall through. diff --git a/lib/MC/MCObjectFileInfo.cpp b/lib/MC/MCObjectFileInfo.cpp index 879aa8035b..c27b88b968 100644 --- a/lib/MC/MCObjectFileInfo.cpp +++ b/lib/MC/MCObjectFileInfo.cpp @@ -283,7 +283,8 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) { TTypeEncoding = (CMModel == CodeModel::Small) ? dwarf::DW_EH_PE_udata4 : dwarf::DW_EH_PE_absptr; } - } else if (T.getArch() == Triple::aarch64) { + } else if (T.getArch() == Triple::aarch64 || + T.getArch() == Triple::aarch64_be ) { // The small model guarantees static code/data size < 4GB, but not where it // will be in memory. Most of these could end up >2GB away so even a signed // pc-relative 32-bit address is insufficient, theoretically. -- cgit v1.2.3