If a version is specified both with --{major,minor}-subsystem-version and with --subsystem <name>:<version>, the one specified last (that actually sets a version) takes precedance in GNU ld; thus doing the same here.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
With BFD (tested version 2.35) the latter specified option takes precedence:
$ gcc clear.c -Wl,--subsystem,windows:7.8,--major-subsystem-version,2,--minor-subsystem-version,3 $ llvm-readobj -h a.exe | grep SubsystemVersion MajorSubsystemVersion: 2 MinorSubsystemVersion: 3 $ gcc clear.c -Wl,--major-subsystem-version,2,--minor-subsystem-version,3,--subsystem,windows:7.8 $ llvm-readobj -h a.exe | grep SubsystemVersion MajorSubsystemVersion: 7 MinorSubsystemVersion: 8
Comment Actions
Updated to iterate over --{major,minor}-subsystem-version and --subsystem, to pick the version from the last one that specifies it.