Skip to content

Revert "Revert "[Object] Handle SHT_CREL relocation sections when resolving relocation data"" #142075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Kewen12
Copy link
Contributor

@Kewen12 Kewen12 commented May 30, 2025

Reverts #142068

This PR breaks several buildbots. e.g https://lab.llvm.org/buildbot/#/builders/10/builds/6340

@llvmbot
Copy link
Member

llvmbot commented May 30, 2025

@llvm/pr-subscribers-llvm-binary-utilities

Author: None (Kewen12)

Changes

Reverts llvm/llvm-project#142068

This PR breaks several buildbots. e.g https://lab.llvm.org/buildbot/#/builders/10/builds/6340


Full diff: https://github.com/llvm/llvm-project/pull/142075.diff

1 Files Affected:

  • (modified) llvm/lib/Object/RelocationResolver.cpp (+2-1)
diff --git a/llvm/lib/Object/RelocationResolver.cpp b/llvm/lib/Object/RelocationResolver.cpp
index a28f5943c320d..8cf748aa5681c 100644
--- a/llvm/lib/Object/RelocationResolver.cpp
+++ b/llvm/lib/Object/RelocationResolver.cpp
@@ -888,7 +888,8 @@ uint64_t resolveRelocation(RelocationResolver Resolver, const RelocationRef &R,
         return Elf64BEObj->getRelSection(R.getRawDataRefImpl())->sh_type;
       };
 
-      if (GetRelSectionType() == ELF::SHT_RELA) {
+      if (GetRelSectionType() == ELF::SHT_RELA ||
+          GetRelSectionType() == ELF::SHT_CREL) {
         Addend = getELFAddend(R);
         // LoongArch and RISCV relocations use both LocData and Addend.
         if (Obj->getArch() != Triple::loongarch32 &&

@ronlieb ronlieb self-requested a review May 30, 2025 01:26
@ronlieb ronlieb merged commit 65c127f into llvm:main May 30, 2025
8 of 12 checks passed
@Kewen12 Kewen12 deleted the revert-142068-revert-141843-fix-dwarfdump branch May 30, 2025 01:27
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants