aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objcopy
diff options
context:
space:
mode:
authorWANG Xuerui <git@xen0n.name>2023-06-26 09:55:13 +0800
committerWeining Lu <luweining@loongson.cn>2023-06-26 10:37:31 +0800
commit441afb3978ce3599b11615d1365a75e32b0fa47c (patch)
tree170d28f496e9e5ad4ba6fad70253d71b92e4304e /llvm/tools/llvm-objcopy
parent9a8727df35da562a3bd18f7356647092f1059188 (diff)
downloadllvm-441afb3978ce3599b11615d1365a75e32b0fa47c.zip
llvm-441afb3978ce3599b11615d1365a75e32b0fa47c.tar.gz
llvm-441afb3978ce3599b11615d1365a75e32b0fa47c.tar.bz2
[llvm-objcopy] Add LoongArch support
Apart from general feature parity, this is also necessary for enabling ClangBuiltLinux that defaults to using LLVM tools. While at it, add a missing comment for the Hexagon definition directly above, so it doesn't get confused with the SPARC definitions. Reviewed By: SixWeining, MaskRay, jhenderson Differential Revision: https://reviews.llvm.org/D153609
Diffstat (limited to 'llvm/tools/llvm-objcopy')
-rw-r--r--llvm/tools/llvm-objcopy/ObjcopyOptions.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/tools/llvm-objcopy/ObjcopyOptions.cpp b/llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
index 9e634fe..265e4fc 100644
--- a/llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
+++ b/llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
@@ -332,7 +332,11 @@ static const StringMap<MachineInfo> TargetMap{
// SPARC
{"elf32-sparc", {ELF::EM_SPARC, false, false}},
{"elf32-sparcel", {ELF::EM_SPARC, false, true}},
+ // Hexagon
{"elf32-hexagon", {ELF::EM_HEXAGON, false, true}},
+ // LoongArch
+ {"elf32-loongarch", {ELF::EM_LOONGARCH, false, true}},
+ {"elf64-loongarch", {ELF::EM_LOONGARCH, true, true}},
};
static Expected<TargetInfo>