Clarify the context of tls_model doc

โš“ Rust    ๐Ÿ“… 2026-04-02    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 6      

surdeus

Iโ€™m a person who builds my Arm64X (which only works on Windows 11 on Arm) DLLs using Rust compiler output.

Iโ€™m finding a resolution of the crash issue (0xc0000096 - privileged instruction) when a x64 app is going to apply LoadLibrary to the built Arm64X DLL.

I understand the core reason for the crash is already identified at ARM64EC static libraries fail when linked into ARM64X DLLs ยท Issue #145154 ยท rust-lang/rust

Also, the candidate fix is available at pull request ARM64EC static libraries fail when linked into ARM64X DLLs ยท Issue #145154 ยท rust-lang/rust, which may solve this problem.

But another issue is that tls_model - The Rust Unstable Book. Iโ€™m not sure whether this tls_model may relate to this Windows-specific TLS callback problem, or not.

This topic Fast thread locals: TLS model - language design - Rust Internals mentions this tls model documentation.

It is said that:

One issue with stabilizing -Ztls-model as-is is that it's rather platform specific, only applying to platforms that use ELF-style TLS.

This is output of my --print tls-models

rustc -Vv

rustc 1.94.1 (e408947bf 2026-03-25)
binary: rustc
commit-hash: e408947bfd200af42db322daf0fadfe7e26d3bd1
commit-date: 2026-03-25
host: aarch64-pc-windows-msvc
release: 1.94.1
LLVM version: 21.1.8

rustc --print tls-models

Available TLS models:
    global-dynamic
    local-dynamic
    initial-exec
    local-exec
    emulated

1 post - 1 participant

Read full topic

๐Ÿท๏ธ Rust_feed