Skip to content

Commit 5937f55

Browse files
Kewen12github-actions[bot]
authored andcommitted
Automerge: Revert "Revert "[Object] Handle SHT_CREL relocation sections when resolving relocation data"" (#142075)
Reverts llvm/llvm-project#142068 This PR breaks several buildbots. e.g https://lab.llvm.org/buildbot/#/builders/10/builds/6340
2 parents 6184536 + 65c127f commit 5937f55

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)