On 11/17/2026 3:04 AM, Bonita Montero wrote:
> Am 15.11.2026 um 21:40 schrieb Chris M. Thomasson:
>
>> iirc, in the .tdata or .tss. But that might be for ELF. For Windows, damn... iirc, in the TIB?
>
> As thread-local data is per thread it isn't in the executable image.
> At least for Windows.
What about:
__declspec(thread) int x;
>
>> https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/ nf-processthreadsapi-tlsalloc
>
> This is to allocate a TLS-slot for a new image.
> You almost never need this.
>