This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
generated from KOLANICH/python_project_boilerplate.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
llvm.patch
219 lines (216 loc) · 10.1 KB
/
llvm.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
From 69daf79bbf2b60e11765f9ed38715c59b47ce4cc Mon Sep 17 00:00:00 2001
From: KOLANICH <[email protected]>
Date: Tue, 19 Oct 2021 12:33:00 +0300
Subject: [PATCH] Added support of Windows XP for the files generated by clang.
In fact I set the versions to 4.0 (Windows NT 4.0) because MinGW-w64 libs have them set so, but I haven't tested the binaries on anything other than XP and ReactOS.
---
lld/COFF/Config.h | 4 ++--
lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm.yaml | 4 ++--
lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml | 4 ++--
lldb/test/Shell/ObjectFile/PECOFF/basic-info.yaml | 4 ++--
lldb/test/Shell/ObjectFile/PECOFF/disassemble-thumb.yaml | 4 ++--
lldb/test/Shell/ObjectFile/PECOFF/invalid-export-table.yaml | 4 ++--
lldb/test/Shell/ObjectFile/PECOFF/section-types.yaml | 4 ++--
lldb/test/Shell/ObjectFile/PECOFF/sections-names.yaml | 4 ++--
lldb/test/Shell/ObjectFile/PECOFF/sections.yaml | 4 ++--
lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml | 4 ++--
lldb/test/Shell/ObjectFile/PECOFF/uuid.yaml | 4 ++--
11 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/lld/COFF/Config.h b/lld/COFF/Config.h
index feaad55da871..5fe5b8a1797a 100644
--- a/lld/COFF/Config.h
+++ b/lld/COFF/Config.h
@@ -247,9 +247,9 @@ struct Configuration {
uint32_t minorImageVersion = 0;
// If changing the default os/subsys version here, update the default in
// the MinGW driver accordingly.
- uint32_t majorOSVersion = 6;
+ uint32_t majorOSVersion = 4;
uint32_t minorOSVersion = 0;
- uint32_t majorSubsystemVersion = 6;
+ uint32_t majorSubsystemVersion = 4;
uint32_t minorSubsystemVersion = 0;
uint32_t timestamp = 0;
uint32_t functionPadMin = 0;
diff --git a/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm.yaml b/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm.yaml
index 321e96bfacfa..71fa267cb4ce 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm.yaml
@@ -16,11 +16,11 @@ OptionalHeader:
ImageBase: 4194304
SectionAlignment: 4096
FileAlignment: 512
- MajorOperatingSystemVersion: 6
+ MajorOperatingSystemVersion: 4
MinorOperatingSystemVersion: 0
MajorImageVersion: 0
MinorImageVersion: 0
- MajorSubsystemVersion: 6
+ MajorSubsystemVersion: 4
MinorSubsystemVersion: 0
Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
diff --git a/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml b/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml
index dd02a378fa2b..4b5d84ca1cf9 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml
@@ -16,11 +16,11 @@ OptionalHeader:
ImageBase: 1073741824
SectionAlignment: 4096
FileAlignment: 512
- MajorOperatingSystemVersion: 6
+ MajorOperatingSystemVersion: 4
MinorOperatingSystemVersion: 0
MajorImageVersion: 0
MinorImageVersion: 0
- MajorSubsystemVersion: 6
+ MajorSubsystemVersion: 4
MinorSubsystemVersion: 0
Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
diff --git a/lldb/test/Shell/ObjectFile/PECOFF/basic-info.yaml b/lldb/test/Shell/ObjectFile/PECOFF/basic-info.yaml
index 702774347eea..32f066cc753b 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/basic-info.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/basic-info.yaml
@@ -16,11 +16,11 @@ OptionalHeader:
ImageBase: 290816
SectionAlignment: 4096
FileAlignment: 512
- MajorOperatingSystemVersion: 6
+ MajorOperatingSystemVersion: 4
MinorOperatingSystemVersion: 0
MajorImageVersion: 0
MinorImageVersion: 0
- MajorSubsystemVersion: 6
+ MajorSubsystemVersion: 4
MinorSubsystemVersion: 0
Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
diff --git a/lldb/test/Shell/ObjectFile/PECOFF/disassemble-thumb.yaml b/lldb/test/Shell/ObjectFile/PECOFF/disassemble-thumb.yaml
index 24027e4a0507..33e27e4d01f3 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/disassemble-thumb.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/disassemble-thumb.yaml
@@ -12,11 +12,11 @@ OptionalHeader:
ImageBase: 4194304
SectionAlignment: 4096
FileAlignment: 512
- MajorOperatingSystemVersion: 6
+ MajorOperatingSystemVersion: 4
MinorOperatingSystemVersion: 0
MajorImageVersion: 0
MinorImageVersion: 0
- MajorSubsystemVersion: 6
+ MajorSubsystemVersion: 4
MinorSubsystemVersion: 0
Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
diff --git a/lldb/test/Shell/ObjectFile/PECOFF/invalid-export-table.yaml b/lldb/test/Shell/ObjectFile/PECOFF/invalid-export-table.yaml
index 389261ad9b10..cc3f429952cf 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/invalid-export-table.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/invalid-export-table.yaml
@@ -11,11 +11,11 @@ OptionalHeader:
ImageBase: 1073741824
SectionAlignment: 4096
FileAlignment: 512
- MajorOperatingSystemVersion: 6
+ MajorOperatingSystemVersion: 4
MinorOperatingSystemVersion: 0
MajorImageVersion: 0
MinorImageVersion: 0
- MajorSubsystemVersion: 6
+ MajorSubsystemVersion: 4
MinorSubsystemVersion: 0
Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
diff --git a/lldb/test/Shell/ObjectFile/PECOFF/section-types.yaml b/lldb/test/Shell/ObjectFile/PECOFF/section-types.yaml
index 9bc64a3178c7..f1419930dfe3 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/section-types.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/section-types.yaml
@@ -12,11 +12,11 @@ OptionalHeader:
ImageBase: 4194304
SectionAlignment: 4096
FileAlignment: 512
- MajorOperatingSystemVersion: 6
+ MajorOperatingSystemVersion: 4
MinorOperatingSystemVersion: 0
MajorImageVersion: 0
MinorImageVersion: 0
- MajorSubsystemVersion: 6
+ MajorSubsystemVersion: 4
MinorSubsystemVersion: 0
Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_NO_SEH, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
diff --git a/lldb/test/Shell/ObjectFile/PECOFF/sections-names.yaml b/lldb/test/Shell/ObjectFile/PECOFF/sections-names.yaml
index e9e752de549f..643b5d38360c 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/sections-names.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/sections-names.yaml
@@ -12,11 +12,11 @@ OptionalHeader:
ImageBase: 1073741824
SectionAlignment: 4096
FileAlignment: 512
- MajorOperatingSystemVersion: 6
+ MajorOperatingSystemVersion: 4
MinorOperatingSystemVersion: 0
MajorImageVersion: 0
MinorImageVersion: 0
- MajorSubsystemVersion: 6
+ MajorSubsystemVersion: 4
MinorSubsystemVersion: 0
Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
diff --git a/lldb/test/Shell/ObjectFile/PECOFF/sections.yaml b/lldb/test/Shell/ObjectFile/PECOFF/sections.yaml
index 1da37a671ecc..2cf2d8358d04 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/sections.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/sections.yaml
@@ -40,11 +40,11 @@ OptionalHeader:
ImageBase: 1073741824
SectionAlignment: 4096
FileAlignment: 512
- MajorOperatingSystemVersion: 6
+ MajorOperatingSystemVersion: 4
MinorOperatingSystemVersion: 0
MajorImageVersion: 0
MinorImageVersion: 0
- MajorSubsystemVersion: 6
+ MajorSubsystemVersion: 4
MinorSubsystemVersion: 0
Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
diff --git a/lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml b/lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml
index 8bda82c6b4a0..c5fd1a3a2b55 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml
@@ -14,11 +14,11 @@ OptionalHeader:
ImageBase: 1073741824
SectionAlignment: 4096
FileAlignment: 512
- MajorOperatingSystemVersion: 6
+ MajorOperatingSystemVersion: 4
MinorOperatingSystemVersion: 0
MajorImageVersion: 0
MinorImageVersion: 0
- MajorSubsystemVersion: 6
+ MajorSubsystemVersion: 4
MinorSubsystemVersion: 0
Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
diff --git a/lldb/test/Shell/ObjectFile/PECOFF/uuid.yaml b/lldb/test/Shell/ObjectFile/PECOFF/uuid.yaml
index 0157fe79224c..3cbb5a8c952b 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/uuid.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/uuid.yaml
@@ -10,11 +10,11 @@ OptionalHeader:
ImageBase: 2147483648
SectionAlignment: 4096
FileAlignment: 512
- MajorOperatingSystemVersion: 6
+ MajorOperatingSystemVersion: 4
MinorOperatingSystemVersion: 0
MajorImageVersion: 0
MinorImageVersion: 0
- MajorSubsystemVersion: 6
+ MajorSubsystemVersion: 4
MinorSubsystemVersion: 0
Subsystem: IMAGE_SUBSYSTEM_WINDOWS_GUI
DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT ]
--
2.32.0