From b9ff4191a15fd9ad4232f16abf61912b004eb071 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Tue, 25 Jul 2017 06:05:49 +0000 Subject: [PATCH] [COFF] ARM64 support for COFFImportFile A test will be committed separately in the lld repo. Differential Revision: https://reviews.llvm.org/D35766 llvm-svn: 308951 --- llvm/lib/Object/COFFImportFile.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/lib/Object/COFFImportFile.cpp b/llvm/lib/Object/COFFImportFile.cpp index d1f46fdfa292..77cb62502c27 100644 --- a/llvm/lib/Object/COFFImportFile.cpp +++ b/llvm/lib/Object/COFFImportFile.cpp @@ -36,6 +36,7 @@ static bool is32bit(MachineTypes Machine) { switch (Machine) { default: llvm_unreachable("unsupported machine"); + case IMAGE_FILE_MACHINE_ARM64: case IMAGE_FILE_MACHINE_AMD64: return false; case IMAGE_FILE_MACHINE_ARMNT: @@ -52,6 +53,8 @@ static uint16_t getImgRelRelocation(MachineTypes Machine) { return IMAGE_REL_AMD64_ADDR32NB; case IMAGE_FILE_MACHINE_ARMNT: return IMAGE_REL_ARM_ADDR32NB; + case IMAGE_FILE_MACHINE_ARM64: + return IMAGE_REL_ARM64_ADDR32NB; case IMAGE_FILE_MACHINE_I386: return IMAGE_REL_I386_DIR32NB; }