mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
Don't initialize the static TLS area in single-threaded builds
This commit is contained in:
parent
ed23615638
commit
b89158d6fd
1 changed files with 14 additions and 12 deletions
|
|
@ -437,6 +437,7 @@ fn posixCallMainAndExit() callconv(.C) noreturn {
|
|||
std.os.linux.pie.relocate(phdrs);
|
||||
}
|
||||
|
||||
if (!builtin.single_threaded) {
|
||||
// ARMv6 targets (and earlier) have no support for TLS in hardware.
|
||||
// FIXME: Elide the check for targets >= ARMv7 when the target feature API
|
||||
// becomes less verbose (and more usable).
|
||||
|
|
@ -451,6 +452,7 @@ fn posixCallMainAndExit() callconv(.C) noreturn {
|
|||
|
||||
// Initialize the TLS area.
|
||||
std.os.linux.tls.initStaticTLS(phdrs);
|
||||
}
|
||||
|
||||
// The way Linux executables represent stack size is via the PT_GNU_STACK
|
||||
// program header. However the kernel does not recognize it; it always gives 8 MiB.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue