[lld] [LLD][COFF] Replace ARM64EC TLS symbols with native symbols when available (PR #212845)
Jacek Caban via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 31 05:06:21 PDT 2026
cjacek wrote:
I could have been more specific, sorry, but you got it right.
Relocations for `.tls` data are relative to section, while TLS directory is filled with `_tls_start`/`_tls_end` symbols. For that to match, `_tls_start` must be really at the beginning of `.tls` section. This is usually guaranteed by section sorting: `_tls_start` uses a plain `.tls` section, data goes to `.tls$` and `_tls_end` goes to `.tls$ZZZ`. That's not enough when we have two `_tls_start` chunks for both views, only one of them would be at the actual beginning of `.tls` section (and it depends on which one happens to be pulled in first).
I think that having separate TLS directories is still an improvement, but that's only about `_tls_used` and `_tls_index`. Here is a version on top of this PR: https://github.com/cjacek/llvm-project/commit/d8b4211e1e0063468489166c9cd068957cf9f688
I will update the description.
https://github.com/llvm/llvm-project/pull/212845
More information about the llvm-commits
mailing list