Summary:
Rusticle binaries built with the MSVC toolchain work correctly on Windows NT 4.0 (and likely Windows 2000 - untested). However, the /SUBSYSTEM flag in link.exe enforces a minimum version of Windows XP (5.01), preventing developers from directly targeting older versions like NT 4.0 or Windows 95.
This limitation requires manual patching of the PE header post-build to lower the subsystem version.
Current Behavior:
- MSVC
link.exe restricts /SUBSYSTEM:CONSOLE,<version> to a minimum of 5.01.
- Rusticle MSVC binaries run successfully on NT 4.0 if the subsystem version is manually patched.
- Rusticle GNU binaries run successfully on NT 4.0
Expected Behavior:
Developers should be able to opt into legacy subsystem versions (e.g. 3.10, 4.00) without manually editing binaries.
Proposed Solutions:
- Add a build flag or profile setting to enable legacy subsystem targeting.
- Provide a post-build script that patches the PE header to set the desired subsystem version.
- Consider a build wrapper that invokes
editbin, llvm-objcopy, or a custom tool to rewrite the header automatically.
- Document subsystem version limitations and compatibility notes for legacy Windows targets.
Environment:
- Rusticle v1.20.1
- Target:
i686-pc-windows-msvc
- Tested on: Windows NT 4.0 (via VirtualBox)
Summary:
Rusticle binaries built with the MSVC toolchain work correctly on Windows NT 4.0 (and likely Windows 2000 - untested). However, the
/SUBSYSTEMflag inlink.exeenforces a minimum version of Windows XP (5.01), preventing developers from directly targeting older versions like NT 4.0 or Windows 95.This limitation requires manual patching of the PE header post-build to lower the subsystem version.
Current Behavior:
link.exerestricts/SUBSYSTEM:CONSOLE,<version>to a minimum of 5.01.Expected Behavior:
Developers should be able to opt into legacy subsystem versions (e.g. 3.10, 4.00) without manually editing binaries.
Proposed Solutions:
editbin,llvm-objcopy, or a custom tool to rewrite the header automatically.Environment:
i686-pc-windows-msvc