[lld] [LLD]Discard invalid "DW.ref.__gxx_personality_v0" pieces in rela.eh_frame (PR #158590)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 16 20:20:39 PDT 2025


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 -- lld/ELF/InputSection.cpp
``````````

: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/InputSection.cpp b/lld/ELF/InputSection.cpp
index 54396cd05..db710a305 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -491,7 +491,8 @@ void InputSection::copyRelocations(Ctx &ctx, uint8_t *buf,
     p->setSymbolAndType(ctx.in.symTab->getSymbolIndex(sym), type,
                         ctx.arg.isMips64EL);
 
-    // Discard the invalid pieces among those named "DW.ref.__gxx_personality_v0".
+    // Discard the invalid pieces among those named
+    // "DW.ref.__gxx_personality_v0".
     StringRef symName = sym.getName();
     if (symName == "DW.ref.__gxx_personality_v0") {
       if (auto *es = dyn_cast<EhInputSection>(sec)) {
@@ -517,7 +518,7 @@ void InputSection::copyRelocations(Ctx &ctx, uint8_t *buf,
         }
       }
     }
-    
+
     if (sym.type == STT_SECTION) {
       // We combine multiple section symbols into only one per
       // section. This means we have to update the addend. That is

``````````

</details>


https://github.com/llvm/llvm-project/pull/158590


More information about the llvm-commits mailing list