[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
This commit is contained in:
Martin Storsjo 2017-07-25 06:05:49 +00:00
parent 8cb3667541
commit b9ff4191a1
1 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,7 @@ static bool is32bit(MachineTypes Machine) {
switch (Machine) { switch (Machine) {
default: default:
llvm_unreachable("unsupported machine"); llvm_unreachable("unsupported machine");
case IMAGE_FILE_MACHINE_ARM64:
case IMAGE_FILE_MACHINE_AMD64: case IMAGE_FILE_MACHINE_AMD64:
return false; return false;
case IMAGE_FILE_MACHINE_ARMNT: case IMAGE_FILE_MACHINE_ARMNT:
@ -52,6 +53,8 @@ static uint16_t getImgRelRelocation(MachineTypes Machine) {
return IMAGE_REL_AMD64_ADDR32NB; return IMAGE_REL_AMD64_ADDR32NB;
case IMAGE_FILE_MACHINE_ARMNT: case IMAGE_FILE_MACHINE_ARMNT:
return IMAGE_REL_ARM_ADDR32NB; return IMAGE_REL_ARM_ADDR32NB;
case IMAGE_FILE_MACHINE_ARM64:
return IMAGE_REL_ARM64_ADDR32NB;
case IMAGE_FILE_MACHINE_I386: case IMAGE_FILE_MACHINE_I386:
return IMAGE_REL_I386_DIR32NB; return IMAGE_REL_I386_DIR32NB;
} }