[php-src] PR #25013: JIT: recognize initial-exec TLS relaxation

From: Date: Wed, 28 Oct 2026 17:23:07 +0000
Subject: [php-src] PR #25013: JIT: recognize initial-exec TLS relaxation
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-40032@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25013 Author: henderkes Description drafted with Codex assistance: > When the JIT inspects a TLS probe relaxed by the linker to initial-exec, the current decoder > falls back to runtime resolution. Recognize the initial-exec sequences on x86-64 and AArch64, and > recover the static offset from the address already computed by the probe. > > Resolve the Windows TLS slot by its address instead of scanning for a matching pointer value. > Update the standalone tests to use the configured TLS declaration and keep no-surplus > dlopen cases on the default TLS model. > > This extracts the resolver prerequisites from #23227 so they can merge before the EG/CG native > TLS move. It works with the existing pointer cache and supports the future struct declaration; the > EG/CG-specific JIT emitter changes remain in #23227. Validation: - Reproduced the original x86-64 decoder's failure on an initial-exec shared-library case. - Passed 176 GCC/Clang TLS cases covering the existing pointer cache in debug/release and the future cache declaration with default/static-cache configurations. Non-PIC executables used -no-pie because static libc is unavailable locally. - ARM64 cross-compilation passed at -O0 and -O3 in debug/release. - Windows x64 ZTS resolver compilation passed with MSVC and Clang-cl in debug/release.

« previous php.git-pulls (#40032) next »