[PATCH] D116335: Make lld to support win-xp
gmh via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 28 16:28:25 PST 2021
gmh5225 updated this revision to Diff 396443.
gmh5225 added a comment.
Fix test and re-upload.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116335/new/
https://reviews.llvm.org/D116335
Files:
lld/COFF/Config.h
lld/COFF/DriverUtils.cpp
lld/test/COFF/hello32.test
Index: lld/test/COFF/hello32.test
===================================================================
--- lld/test/COFF/hello32.test
+++ lld/test/COFF/hello32.test
@@ -34,11 +34,11 @@
HEADER-NEXT: ImageBase: 0x400000
HEADER-NEXT: SectionAlignment: 4096
HEADER-NEXT: FileAlignment: 512
-HEADER-NEXT: MajorOperatingSystemVersion: 6
+HEADER-NEXT: MajorOperatingSystemVersion: 4
HEADER-NEXT: MinorOperatingSystemVersion: 0
HEADER-NEXT: MajorImageVersion: 0
HEADER-NEXT: MinorImageVersion: 0
-HEADER-NEXT: MajorSubsystemVersion: 6
+HEADER-NEXT: MajorSubsystemVersion: 4
HEADER-NEXT: MinorSubsystemVersion: 0
HEADER-NEXT: SizeOfImage: 20480
HEADER-NEXT: SizeOfHeaders: 1024
Index: lld/COFF/DriverUtils.cpp
===================================================================
--- lld/COFF/DriverUtils.cpp
+++ lld/COFF/DriverUtils.cpp
@@ -386,11 +386,12 @@
// Emit the XML. Note that we do *not* verify that the XML attributes are
// syntactically correct. This is intentional for link.exe compatibility.
- os << "<?xml version=\"1.0\" standalone=\"yes\"?>\n"
- << "<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\"\n"
- << " manifestVersion=\"1.0\">\n";
+ // Use microsoft xml to support win-xp.
+ os << "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\n"
+ << "<assembly xmlns='urn:schemas-microsoft-com:asm.v1' "
+ "manifestVersion='1.0'>\n";
if (config->manifestUAC) {
- os << " <trustInfo>\n"
+ os << " <trustInfo xmlns=\"urn:schemas-microsoft-com:asm.v3\">\n"
<< " <security>\n"
<< " <requestedPrivileges>\n"
<< " <requestedExecutionLevel level=" << config->manifestLevel
Index: lld/COFF/Config.h
===================================================================
--- lld/COFF/Config.h
+++ lld/COFF/Config.h
@@ -248,9 +248,11 @@
uint32_t minorImageVersion = 0;
// If changing the default os/subsys version here, update the default in
// the MinGW driver accordingly.
- uint32_t majorOSVersion = 6;
+ // Chang the value to 4 to support win-xp
+ uint32_t majorOSVersion = 4;
uint32_t minorOSVersion = 0;
- uint32_t majorSubsystemVersion = 6;
+ // Chang the value to 4 to support win-xp
+ uint32_t majorSubsystemVersion = 4;
uint32_t minorSubsystemVersion = 0;
uint32_t timestamp = 0;
uint32_t functionPadMin = 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116335.396443.patch
Type: text/x-patch
Size: 2372 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211229/c3c9aa7c/attachment.bin>
More information about the llvm-commits
mailing list