zig/lib/std
Alex Rønne Petersen cb1fffb29e
std.os.windows.tls: Set AddressOfCallBacks to &__xl_a + 1.
`__xl_a` is just a global variable containing a null function pointer. There's
nothing magical about it or its name at all.

The section names used on `__xl_a` and `__xl_b` (`.CRT$XLA` and `.CRT$XLZ`) are
the real magic here. The compiler emits TLS variables into `.CRT$XL<x>`
sections, where `x` is an uppercase letter between A and Z (exclusive). The
linker then sorts those sections alphabetically (due to the `$`), and the result
is a neat array of TLS initialization callbacks between `__xl_a` and `__xl_z`.

That array is null-terminated, though! Normally, `__xl_z` serves as the null
terminator; however, by pointing `AddressesOfCallBacks` to `__xl_a`, which just
contains a null function pointer, we've effectively made it so that the PE
loader will just immediately stop invoking TLS callbacks. Fix that by pointing
to the first actual TLS callback instead (or `__xl_z` if there are none).
2024-08-03 20:55:00 +02:00
..
Build Merge pull request #20667 from jayrod246/windows-watch 2024-07-28 20:35:18 -07:00
c std.Target: Remove kfreebsd OS specifier. 2024-07-20 05:08:14 +02:00
compress std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
crypto remove hard tabs from source code 2024-07-31 16:57:42 -07:00
debug reintroduce std.Dwarf.abi.supportsUnwinding 2024-08-02 14:15:03 -07:00
dwarf std: dwarf namespace reorg 2024-08-01 13:56:12 -07:00
fmt std.fmt.formatFloat: skip f80 round-trip tests on x86_64 windows 2024-07-14 11:19:34 +12:00
fs add std.fs.Dir.Handle 2024-08-01 13:47:23 -07:00
hash std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
heap riscv: workarounds for riscv threading 2024-07-26 14:53:50 -07:00
http std.posix.iovec: use .base and .len instead of .iov_base and .iov_len 2024-04-28 00:20:30 -07:00
io implement std.testing.fuzzInput 2024-07-25 18:52:20 -07:00
json Add std.json.ParseOptions.parse_numbers to preserve float precision (#20744) 2024-07-25 20:55:06 -04:00
math std.math.complex: fix cosh/tanh 2024-07-30 20:31:22 +12:00
mem
meta
net
os std.os.windows.tls: Set AddressOfCallBacks to &__xl_a + 1. 2024-08-03 20:55:00 +02:00
posix std: Stop supporting Linux/glibc versions older than declared in std.Target. 2024-07-29 09:50:41 +02:00
process Allow setting PGID in std.process.Child.spawn 2024-07-22 11:50:00 +09:00
Random add std.testing.random_seed 2024-07-23 11:43:12 -07:00
sort std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
tar std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
Target std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
testing
Thread std.c reorganization 2024-07-19 00:30:32 -07:00
time
tz
unicode
valgrind std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
zig tokenizer: tabs and carriage returns spec conformance 2024-07-31 16:57:42 -07:00
zip std: Convert deprecated aliases to compile errors and fix usages 2024-06-13 10:18:59 -04:00
array_hash_map.zig docs: ArrayHashMap: warn against the shrink footgun 2024-07-26 15:24:25 -07:00
array_list.zig std.ArrayList.unusedCapacitySlice: Return unaligned slice (#20490) 2024-07-14 00:56:29 +00:00
ascii.zig Rename isASCII to isAscii 2024-07-02 16:31:15 +02:00
atomic.zig Merge pull request #20870 from alexrp/target-cleanup-3 2024-08-01 01:32:32 -07:00
base64.zig
bit_set.zig
BitStack.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
bounded_array.zig Implement addManyAsSlice for BoundedArray 2024-05-21 13:46:05 +03:00
buf_map.zig
buf_set.zig
Build.zig Add libcpp option to test options 2024-07-28 20:40:53 -07:00
builtin.zig std.Target: Remove sparcel architecture tag. 2024-07-30 06:30:25 +02:00
c.zig std.Target: Remove sparcel architecture tag. 2024-07-30 06:30:25 +02:00
coff.zig std.coff: Add missing entries to MachineType. 2024-07-24 15:02:55 -07:00
compress.zig
crypto.zig
debug.zig fix compilation on powerpc GNU systems 2024-08-02 14:14:59 -07:00
dwarf.zig std: dwarf namespace reorg 2024-08-01 13:56:12 -07:00
dynamic_library.zig std.c reorganization 2024-07-19 00:30:32 -07:00
elf.zig std.elf.EM: Add missing MICROBLAZE value. 2024-07-30 01:29:38 +02:00
enums.zig EnumMap: fix init 2024-05-26 16:13:54 -04:00
fifo.zig
fmt.zig fix std.fmt.hex 2024-07-20 01:06:29 -07:00
fs.zig std.fs.Dir: Refactor atomicSymLink from std.fs 2024-07-28 20:08:52 -07:00
gpu.zig
hash.zig
hash_map.zig add std.testing.random_seed 2024-07-23 11:43:12 -07:00
heap.zig std.c reorganization 2024-07-19 00:30:32 -07:00
http.zig std: avoid references that trigger compile errors 2024-07-04 21:01:42 +01:00
io.zig Better implementation of GetLastError. (#20623) 2024-07-15 10:49:51 -07:00
json.zig Delete compile errors for deprecated decls 2024-05-03 13:27:30 -07:00
leb128.zig Rename *[UI]LEB128 functions to *[UI]leb128 2024-06-23 04:30:12 +01:00
linked_list.zig
log.zig update the codebase for the new std.Progress API 2024-05-27 20:56:48 -07:00
macho.zig remove hard tabs from source code 2024-07-31 16:57:42 -07:00
math.zig aarch64: reenable tests that are no longer regressed 2024-07-25 20:23:23 +03:00
mem.zig std.mem.readVarInt: fix for 8-bits and below (Reloaded) (#20513) 2024-07-28 20:26:36 -07:00
meta.zig chore: correct non-standard comments. 2024-07-28 21:34:14 -07:00
multi_array_list.zig InternPool: implement and use thread-safe list for strings 2024-07-07 22:59:52 -04:00
net.zig std.c reorganization 2024-07-19 00:30:32 -07:00
once.zig std: improve std.once tests 2024-04-15 15:24:30 -07:00
os.zig std.c reorganization 2024-07-19 00:30:32 -07:00
packed_int_array.zig chore: correct non-standard comments. 2024-07-28 21:34:14 -07:00
pdb.zig std.debug: rename Info to SelfInfo 2024-08-01 22:11:35 -07:00
posix.zig std: Stop supporting Linux/glibc versions older than declared in std.Target. 2024-07-29 09:50:41 +02:00
priority_dequeue.zig add std.testing.random_seed 2024-07-23 11:43:12 -07:00
priority_queue.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
process.zig move std.zig.fatal to std.process.fatal 2024-07-20 01:06:28 -07:00
Progress.zig std.posix: Consider invalid signal numbers to sigaction() to be programmer error. 2024-07-21 22:38:09 +02:00
Random.zig std: Convert deprecated aliases to compile errors and fix usages 2024-06-13 10:18:59 -04:00
RingBuffer.zig
segmented_list.zig
SemanticVersion.zig
simd.zig aarch64: reenable tests that are no longer regressed 2024-07-25 20:23:23 +03:00
sort.zig add std.testing.random_seed 2024-07-23 11:43:12 -07:00
start.zig std: Move start_windows_tls.zig to os/windows/tls.zig. 2024-08-03 20:35:08 +02:00
static_string_map.zig std.static_string_map: Cast length of input for runtime initialization 2024-06-20 23:22:39 +00:00
std.zig std: Convert deprecated aliases to compile errors and fix usages 2024-06-13 10:18:59 -04:00
tar.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
Target.zig Merge pull request #20870 from alexrp/target-cleanup-3 2024-08-01 01:32:32 -07:00
testing.zig implement std.testing.fuzzInput 2024-07-25 18:52:20 -07:00
Thread.zig std.os.linux.tls: Refactor and improve documentation. 2024-07-30 02:32:32 +02:00
time.zig std.c reorganization 2024-07-19 00:30:32 -07:00
treap.zig Condense and extend std.Treap's traversal functionalities. (#20002) 2024-07-28 19:47:55 -07:00
tz.zig
unicode.zig std.zig.tokenizer: simplify 2024-07-31 16:57:42 -07:00
Uri.zig
valgrind.zig Rename nonSIMDCall* to nonSimdCall* 2024-07-03 19:00:17 +01:00
wasm.zig
zig.zig move std.zig.fatal to std.process.fatal 2024-07-20 01:06:28 -07:00
zip.zig std.zip: Fix typo in doc comments 2024-06-17 16:12:19 -04:00