[lld] [ELF] Add target-specific relocation scanning for PPC64 (PR #181496)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 14 10:48:44 PST 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- lld/ELF/Arch/PPC64.cpp lld/ELF/InputSection.cpp lld/ELF/Relocations.cpp lld/ELF/Relocations.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lld/ELF/Arch/PPC64.cpp b/lld/ELF/Arch/PPC64.cpp
index 09107efd7..6f5412427 100644
--- a/lld/ELF/Arch/PPC64.cpp
+++ b/lld/ELF/Arch/PPC64.cpp
@@ -616,7 +616,6 @@ PPC64::PPC64(Ctx &ctx) : TargetInfo(ctx) {
write32(ctx, trapInstr.data(), 0x7fe00008);
}
-
static uint32_t getEFlags(InputFile *file) {
if (file->ekind == ELF64BEKind)
return cast<ObjFile<ELF64BE>>(file)->getObj().getHeader().e_flags;
@@ -1664,7 +1663,6 @@ bool PPC64::inBranchRange(RelType type, uint64_t src, uint64_t dst) const {
llvm_unreachable("unsupported relocation type used in branch");
}
-
RelExpr PPC64::adjustGotPcExpr(RelType type, int64_t addend,
const uint8_t *loc) const {
if ((type == R_PPC64_GOT_PCREL34 || type == R_PPC64_PCREL_OPT) &&
``````````
</details>
https://github.com/llvm/llvm-project/pull/181496
More information about the llvm-commits
mailing list