[lld] [lld][ELF] Merge .ltext.* input sections into .ltext output section (PR #190305)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 20:49:15 PDT 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 -- lld/ELF/LinkerScript.cpp --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/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 4c7139a34..9277c79af 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -105,14 +105,17 @@ StringRef LinkerScript::getOutputSectionName(const InputSectionBase *s) const {
return ".text";
}
- for (StringRef v : {".data.rel.ro", ".data", ".rodata",
- ".bss.rel.ro", ".bss", ".ltext",
- ".ldata", ".lrodata", ".lbss",
- ".gcc_except_table",
- ".init_array", ".fini_array", ".tbss",
- ".tdata", ".ARM.exidx", ".ARM.extab",
- ".ctors", ".dtors", ".sbss",
- ".sdata", ".srodata"})
+ for (StringRef v : {".data.rel.ro", ".data",
+ ".rodata", ".bss.rel.ro",
+ ".bss", ".ltext",
+ ".ldata", ".lrodata",
+ ".lbss", ".gcc_except_table",
+ ".init_array", ".fini_array",
+ ".tbss", ".tdata",
+ ".ARM.exidx", ".ARM.extab",
+ ".ctors", ".dtors",
+ ".sbss", ".sdata",
+ ".srodata"})
if (isSectionPrefix(v, s->name))
return v;
``````````
</details>
https://github.com/llvm/llvm-project/pull/190305
More information about the llvm-commits
mailing list