[all-commits] [llvm/llvm-project] 0f2432: [LLD][COFF] Replace ARM64EC TLS directory chunks w...
Jacek Caban via All-commits
all-commits at lists.llvm.org
Tue Aug 4 05:31:05 PDT 2026
Branch: refs/heads/release/23.x
Home: https://github.com/llvm/llvm-project
Commit: 0f2432581d34b31672bb6b9a659a73acd368fff5
https://github.com/llvm/llvm-project/commit/0f2432581d34b31672bb6b9a659a73acd368fff5
Author: Jacek Caban <jacek at codeweavers.com>
Date: 2026-08-04 (Tue, 04 Aug 2026)
Changed paths:
M lld/COFF/Chunks.h
M lld/COFF/Driver.cpp
A lld/test/COFF/arm64x-tls.s
Log Message:
-----------
[LLD][COFF] Replace ARM64EC TLS directory chunks with native chunks when available (#212845)
On ARM64X targets, CRT provides separate TLS directory chunks, expecting
the linker to sort it out. TLS directory uses _tls_start and _tls_end
symbols to reference .tls section. Those symbols use section sorting to
ensure that they are emitted at the start and end of .tls section, but that's
not enough when we have two separate chunks for views: only one of them
can really be the first one. Following MSVC, merge those chunks instead so
that both symbol tables point to the same chunk.
Additionally apply the same logic to _tls_used and _tls_index. This
allows entire TLS directory to be shared between EC and native views. To
achieve that, CRT additionally needs to mark each TLS callback with
-arm64xsameaddress. This matches how MSVC linker and libraries work, but
it requires EC and native views to use the same set of TLS callbacks. We
may emit separate TLS directories in the future to make it more robust.
(cherry picked from commit e096d2f60dbc6cab991d5c02a5f7125a6dc694dc)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list