[BinaryFormat] Add LoongArch

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D138018
This commit is contained in:
WANG Xuerui 2022-11-17 12:00:48 +08:00 committed by Weining Lu
parent db8a96731f
commit cc07185a68
1 changed files with 3 additions and 0 deletions

View File

@ -197,6 +197,7 @@ uint16_t ELF::convertArchNameToEMachine(StringRef Arch) {
.Case("bpf", EM_BPF)
.Case("ve", EM_VE)
.Case("csky", EM_CSKY)
.Case("loongarch", EM_LOONGARCH)
.Default(EM_NONE);
}
@ -561,6 +562,8 @@ StringRef ELF::convertEMachineToArchName(uint16_t EMachine) {
return "ve";
case EM_CSKY:
return "csky";
case EM_LOONGARCH:
return "loongarch";
default:
return "None";
}