[VE] Support R_VE_RELATIVE
Change getELFRelativeRelocationType() to return R_VE_RELATIVE as a preparation of lld for VE. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D115592
This commit is contained in:
parent
2e585dd91a
commit
d1057f9604
|
@ -210,6 +210,8 @@ uint32_t llvm::object::getELFRelativeRelocationType(uint32_t Machine) {
|
|||
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:
|
||||
|
|
|
@ -53,7 +53,7 @@ TEST(ELFTest, getELFRelocationTypeNameForVE) {
|
|||
}
|
||||
|
||||
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.
|
||||
|
|
Loading…
Reference in New Issue