[lld] [lld][MachO] Remove `__thread_ptrs` section so TLV can relocate against dynamic-lookup symbols (PR #221364)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 13:54:35 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 h,cpp -- lld/MachO/InputSection.cpp lld/MachO/InputSection.h lld/MachO/MapFile.cpp lld/MachO/Relocations.cpp lld/MachO/Symbols.cpp lld/MachO/Symbols.h lld/MachO/SyntheticSections.cpp lld/MachO/SyntheticSections.h lld/MachO/Writer.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/MachO/Writer.cpp b/lld/MachO/Writer.cpp
index c9254b712..b97203d65 100644
--- a/lld/MachO/Writer.cpp
+++ b/lld/MachO/Writer.cpp
@@ -665,7 +665,7 @@ void Writer::treatSpecialUndefineds() {
 // Give a symbol its single non-lazy pointer slot. A GOT reference and a TLV
 // reference to a thread-local both want the same value -- the address of its
 // TLV descriptor -- so one __got entry serves both, and the result no longer
-// depends on which reference the relocation scan reaches first. 
+// depends on which reference the relocation scan reaches first.
 static void addNonLazyPointerEntry(Symbol *sym) { in.got->addEntry(sym); }
 
 static void prepareSymbolRelocation(Symbol *sym, const InputSection *isec,

``````````

</details>


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


More information about the llvm-commits mailing list