Skip to content

Commit 0b9cdc0

Browse files
Kewen12sivan-shani
authored andcommitted
Revert "Revert "[Object] Handle SHT_CREL relocation sections when resolving relocation data"" (llvm#142075)
Reverts llvm#142068 This PR breaks several buildbots. e.g https://lab.llvm.org/buildbot/#/builders/10/builds/6340
1 parent aa3b52f commit 0b9cdc0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Object/RelocationResolver.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,8 @@ uint64_t resolveRelocation(RelocationResolver Resolver, const RelocationRef &R,
888888
return Elf64BEObj->getRelSection(R.getRawDataRefImpl())->sh_type;
889889
};
890890

891-
if (GetRelSectionType() == ELF::SHT_RELA) {
891+
if (GetRelSectionType() == ELF::SHT_RELA ||
892+
GetRelSectionType() == ELF::SHT_CREL) {
892893
Addend = getELFAddend(R);
893894
// LoongArch and RISCV relocations use both LocData and Addend.
894895
if (Obj->getArch() != Triple::loongarch32 &&

0 commit comments

Comments
 (0)