[PATCH] D115592: [VE] Support R_VE_RELATIVE
Kazushi Marukawa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 11 20:12:23 PST 2021
kaz7 created this revision.
kaz7 added reviewers: simoll, k-ishizaka.
kaz7 added projects: LLVM, VE.
Herald added a subscriber: hiraditya.
kaz7 requested review of this revision.
Herald added a subscriber: llvm-commits.
Change getELFRelativeRelocationType() to return R_VE_RELATIVE
as a preparation of lld for VE.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D115592
Files:
llvm/lib/Object/ELF.cpp
llvm/unittests/Object/ELFTest.cpp
Index: llvm/unittests/Object/ELFTest.cpp
===================================================================
--- llvm/unittests/Object/ELFTest.cpp
+++ llvm/unittests/Object/ELFTest.cpp
@@ -53,7 +53,7 @@
}
TEST(ELFTest, getELFRelativeRelocationType) {
- EXPECT_EQ(0U, getELFRelativeRelocationType(EM_VE));
+ EXPECT_EQ(ELF::R_VE_RELATIVE, getELFRelativeRelocationType(EM_VE));
}
// This is a test for the DataRegion helper struct, defined in ELF.h header.
Index: llvm/lib/Object/ELF.cpp
===================================================================
--- llvm/lib/Object/ELF.cpp
+++ llvm/lib/Object/ELF.cpp
@@ -210,6 +210,8 @@
return ELF::R_SPARC_RELATIVE;
case ELF::EM_CSKY:
return ELF::R_CKCORE_RELATIVE;
+ case ELF::EM_VE:
+ return ELF::R_VE_RELATIVE;
case ELF::EM_AMDGPU:
break;
case ELF::EM_BPF:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115592.393717.patch
Type: text/x-patch
Size: 841 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211212/69386c56/attachment.bin>
More information about the llvm-commits
mailing list