Releases: XTLS/go-win7
Patched Go 1.26.0 for Windows 7 (2026-02-14 Release)
Upgrade to Go 1.26.0 with patch updates.
NOTICE
- This SDK does not include support for Windows on 32-bit ARM.
- This SDK does not include a patch for
-raceflag (Race Detector) for Windows 7 / Windows Server 2008 R2. This is a known issue which occurred since Go 1.21 and fixing this has side-effects on newer Windows. - This SDK does not include testing files anymore like official distributions.
- The repository will drop support for Windows7 (without Service Pack installed) / Windows Server 2008 R2 (without Service Pack installed) since Go 1.27.
Packages:
-
go-for-win7-{GOOS}-{GOARCH}.zip: Pre-compiled SDK binaries and source code including patches below:
- Fix incompatibility problem from
RemoveAll() - Substitute
ProcessPrngcalling withRtlGenRandomcalling - Add back legacy console handle workaround for Windows 7
- Fix incompatibility problem from
-
source-pre-KB2533623.zip: Source code targeting Windows 7 SP1 / Windows Server 2008 R2 SP1 that without KB2533623 (July 2011) installed or without KB3125574 (May 2016, with Servicing Stack Update at least from KB3020369 (April 2015)) installed. This package can be manually compiled (bootstrapping) or copy-paste the
srcdirectory to a usable SDK. This package including patches below:- All patches from go-for-win7-{GOOS}-{GOARCH}.zip
- Substitute
LoadLibraryExWcalling withLoadLibraryAcalling andLoadLibraryWcalling. - Keep in mind that using
LoadLibrary*inside this SDK might be less secured than usingLoadLibraryEx*
-
source-pre-SP1.zip: Source code targeting Windows 7 / Windows Server 2008 R2 that without Service Pack 1 (KB976932, February 2011) installed. This package can be manually compiled (bootstrapping) or copy-paste the
srcdirectory to a usable SDK. This package including patches below:- All patches from source-pre-KB2533623.zip
- Substitute
WSASocketcalling withsysSocketcalling.
升级至 Go 1.26.0,并包含相关补丁更新。
注意事项
- 本 SDK 不支持 32 位 ARM 架构的 Windows。
- 本 SDK 不包含针对 Windows 7 / Windows Server 2008 R2 上
-race参数(Race Detector,竞态检测器)的补丁。该问题自 Go 1.21 起已存在,目前修复会对较新版本的 Windows 产生副作用,因此不提供修复。 - 本 SDK 不再包含与官方发行版类似的测试文件。
- 仓库将从 Go 1.27 开始去除对未安装任何 Service Pack 的 Windows 7/ Windows 2008 R2 的支持。
软件包说明
-
go-for-win7-{GOOS}-{GOARCH}.zip:预编译的 SDK 二进制文件及源代码,包含以下补丁:
- 修复
RemoveAll()的不兼容问题 - 将
ProcessPrng调用替换为RtlGenRandom调用 - 恢复对 Windows 7 的旧版控制台句柄兼容性处理
- 修复
-
source-pre-KB2533623.zip:适用于未安装 KB2533623(2011 年 7 月)或未安装 KB3125574(2016 年 5 月,且至少需安装 KB3020369(2015 年 4 月)服务堆栈更新)的 Windows 7 SP1 / Windows Server 2008 R2 SP1 的源代码包。该软件包可用于手动编译(bootstrap 引导构建),或将其中的
src目录复制到可用的 SDK 中使用。包含以下补丁:- 包含 go-for-win7-{GOOS}-{GOARCH}.zip 中的所有补丁
- 将
LoadLibraryExW调用替换为LoadLibraryA和LoadLibraryW调用 - 请注意:在本 SDK 中使用
LoadLibrary*相较于使用LoadLibraryEx*,在安全性方面可能有所降低
-
source-pre-SP1.zip:适用于未安装 Service Pack 1 (KB976932,2011 年 2 月)的 Windows 7 / Windows Server 2008 R2 的源代码包。该软件包可用于手动编译(bootstrap 引导构建),或将其中的
src目录复制到可用的 SDK 中使用。包含以下补丁:- 包含 source-pre-KB2533623.zip 中的所有补丁
- 将
WSASocket调用替换为sysSocket调用
Patched 1.26.0 Pre KB2533623 Releasing Test
This release is for testing releasing the SDK source code with pre-KB2533623 (July 2011) patch.
The patched source code is named source-pre-LoadLibraryEx.zip, which is aimed at resolving compatibility problems on Windows 7 / Windows Server 2008 R2 without KB2533623 installed, which containing LOAD_LIBRARY_SEARCH_* flags used in modern Go SDKs.
The patched source code pack needs to be compiled manually after download, or if you are running compiling jobs on a non-Windows environment or on a newer Windows environment, you can just swap the src directory and then continuing to compile binaries that can work on pre-KB2533623 environments.
The pre-KB2533623 patch will change LoadLibraryExW callings with LoadLibraryA callings and LoadLibraryW callings without fallback mechanism.
Other package in this release are ordinary patched Go 1.26.0 releases without pre-KB2533623 patch.
该发布用于测试带有针对没有安装 KB2533623(2011 年七月)的环境的 SDK 源代码。
该 SDK 源代码包命名为 source-pre-LoadLibraryEx.zip,包含了针对未安装 KB2533623 更新的 Windows 7/Windows Server 2008 R2 环境的兼容性代码,以解决未包含 LOAD_LIBRARY_SEARCH_* 标记导致 LoadLibraryExW 调用不可用的兼容性问题。该源代码包需要手动编译;又或者在非 Windows 环境下进行编译又或者是在较新的 Windows 环境下编译时,将 src 目录进行替换即可针对未安装 KB2533623 的目标编译二进制可执行文件。
针对未安装 KB2533623 的补丁会将所有 LoadLibraryExW 调用以非回退方式替换为 LoadLibraryA 调用及 LoadLibraryW 调用。
发布中的其它包均为普通的不包含 KB2533623 补丁的 SDK。
Patched Go 1.26.0 for Windows 7
Upgrade to Go 1.26.0 with patch updates.
NOTE:
- As official Go had removed support for Windows on 32-bit ARM, the
runtimepackage and thesyscallpackage has also been tidied up, which made implementing the patches for falling back fromLoadLibraryExWtoLoadLibraryWbecoming harder, and also several changes from upstream making patching the SDK to use older Windows APIs harder. So the system requirement for Windows 7 has changed: now KB4474419 has to be installed on the target machine.
We might release a separated version for Windows 7 without KB4474419 installed once we find out a solution. If there is no solution, the system requirement of KB4474419 will be the new baseline. - This SDK won't support Windows on 32-bit ARM.
Known issue(s):
- Race detector (
-race) is known that not working on Windows 7.
已升级到 Go 1.26 并且更新了兼容补丁的 Go SDK。
注意:
- 由于 Go 官方移除了 Windows on ARM32 的支持,
runtime以及syscall两个包的代码已被重新整理,因此用于将LoadLibraryExW动态回落到LoadLibraryW的补丁难以部署。同时因为上游的更改,部署能使 SDK 利用旧版 Windows API 更为困难,因此针对 Windows 7 的系统要求基线已更改:目标系统需要已安装 KB4474419。
如果后续能找到相应的解决方案,有可能会针对未安装 KB4474419 的系统发布单独的 SDK。 - 该 SDK 不支持 ARM32 上运行的 Windows。
已知问题:
- 竞争条件检测器 (
-race) 在 Windows 7 上无法正常使用。
Patched Go 1.25.7 for Windows 7
Upgrade to Go 1.25.7 with compatibility patches
Notes:
- Race detector won't work on Windows 7/8.1 since Go 1.21. Fixing it may cause problems on either older Windows or newer Windows.
- Running compiling jobs on Windows 7 SP1/Windows Server 2008 R2 SP1 has been tested and currently found no problem.
Patched Go 1.25.6 for Windows 7
Upgrade to Go 1.25.6 with compatibility patches
Notes:
- Race detector won't work on Windows 7/8.1 since Go 1.21. Fixing it may cause problems on either older Windows or newer Windows.
- Running compiling jobs on Windows 7 SP1/Windows Server 2008 R2 SP1 has been tested and currently found no problem.
Patched Go 1.25.5 for Windows 7
Upgrade to Go 1.25.5 with compatibility patches
Notes:
- Race detector won't work on Windows 7/8.1 since Go 1.21
- This patched SDK only guarantee that compiled output binaries can safely run on legacy Windows. Compiling binaries using this SDK on Windows 7 is not guaranteed, as the minimum compiling test runs on a network-enabled Windows 8.1 VM, while the Windows 7 SP1 VM is running without updates thus without internet connections (and Windows 7 uses Powershell 2.0, and a Windows 7 installation with certain updates installed will run several Go versions that won't work on Windows 7 without certain updates, like Go 1.21.0-1.21.4, making it hard to determine whether it it really okay running on Windows 7), so only the is-the-binary-running test runs on Windows 7. Compiling with this SDK to produce a Windows 7 runnable binary on Linux/macOS/Windows 8.1/10/11 won't be affected.
- 该 SDK 仅保证编译出来的二进制文件能在旧版本 Windows 中稳定运行 ,不保证使用者能在 Windows 7 下使用该工具进行编译。目前 编译测试运行在联网的 Windows 8.1 虚拟机中 ,而 Windows 7 SP1 虚拟机因未经更新而禁止联网(Windows 7 使用 Powershell 2.0 可能导致编译问题,且安装更新后的 Windows 7 SP1 可能会导致本来不能正常运行的 Go 版本正常运行,如同 Go 1.21.0-1.21.4 的情况,令实际的运行性测试出现不同的结果),因此针对 Windows 7 的测试仅有编译后二进制正常运行测试。使用该 SDK 在 Linux/macOS/Windows 8.1/10/11 下编译 Windows 7 可用的二进制不受影响。
Patched Go 1.25.4 for Windows 7
Upgrade to Go 1.25.4 with compatibility patches
Known issues:
-raceflag is known to be broken
Patched Go 1.25.3 for Windows 7
Upgrade to Go 1.25.3 with patch updates.
Known issue(s)
-raceflag is broken
Patched Go 1.25.2 for Windows 7
Upgrade to Go 1.25.2 with patch updates.
Added patch(es)
- Root.RemoveAll behaviour changed in Windows, which will cause removing a directory failing on Windows 7 and Windows 8.1. uptream commit 1 upstream commit 2
- Current patch is referenced from thongtech/go-legacy-win7. May re-patch in Go 1.26.
Known Issue(s)
-raceflag ingois broken on both Windows 7 x86-64 and Windows 8.1 x86-64 due to this commit from upstream- The problem occurred since Go 1.21
- Fixing this means not only fixing it in Go 1.25, but Go 1.24, Go 1.23, Go 1.22 and Go 1.21 also need the fixing. This implies a re-releasing for previous patched Go 1.23.x and patched Go 1.24.x.
- The problem was reported on September 2025, which means a very limited usage on this flag.
- Concluding from the current consideration, this problem will remain unfixed until changes in the future situation.
Patched Go 1.25.1 for Windows 7
Upgrade to Go 1.25.1 with patch updates.