diff options
author | WANG Xuerui <git@xen0n.name> | 2022-12-01 17:58:11 +0800 |
---|---|---|
committer | Weining Lu <luweining@loongson.cn> | 2022-12-01 19:16:51 +0800 |
commit | 28b4838a33b66830a0e508559effb37ffe1a20bf (patch) | |
tree | 8a597c081e09a265f1cf138a88d319edd0afcf8f /llvm/lib/Object/ELF.cpp | |
parent | 06846596eb1768eea06778a5b6da31145e84e461 (diff) | |
download | llvm-28b4838a33b66830a0e508559effb37ffe1a20bf.zip llvm-28b4838a33b66830a0e508559effb37ffe1a20bf.tar.gz llvm-28b4838a33b66830a0e508559effb37ffe1a20bf.tar.bz2 |
[Object] Add some more LoongArch support
Add ELFObjectFileBase::getLoongArchFeatures, and return the proper ELF
relative reloc type for LoongArch.
Reviewed By: MaskRay, SixWeining
Differential Revision: https://reviews.llvm.org/D138016
Diffstat (limited to 'llvm/lib/Object/ELF.cpp')
-rw-r--r-- | llvm/lib/Object/ELF.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Object/ELF.cpp b/llvm/lib/Object/ELF.cpp index 0d5aa91..93d3476 100644 --- a/llvm/lib/Object/ELF.cpp +++ b/llvm/lib/Object/ELF.cpp @@ -223,6 +223,8 @@ uint32_t llvm::object::getELFRelativeRelocationType(uint32_t Machine) { break; case ELF::EM_BPF: break; + case ELF::EM_LOONGARCH: + return ELF::R_LARCH_RELATIVE; default: break; } |