Skip to content

Commit 85b30ab

Browse files
Undo the section ordering change for Win32 and disable ASLR
ASLR means that there is an extra .reloc section in the executable. Just disable it for now as adjusting the deploy process is complex.
1 parent c6daf07 commit 85b30ab

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

config/win32.gypi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
'VCLinkerTool':
145145
{
146146
'SubSystem': '2',
147+
'RandomizedBaseAddress': '1', # /DYNAMICBASE:NO - disable ASLR
147148
},
148149
},
149150
},

engine/src/deploy_windows.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1645,11 +1645,11 @@ Exec_stat MCDeployToWindows(const MCDeployParameters& p_params)
16451645
{
16461646
t_section_count = t_nt_header . FileHeader . NumberOfSections;
16471647
if (p_params . payload != nil)
1648-
t_payload_section = &t_section_headers[t_section_count - 4];
1648+
t_payload_section = &t_section_headers[t_section_count - 3];
16491649
else
16501650
t_payload_section = nil;
1651-
t_project_section = &t_section_headers[t_section_count - 3];
1652-
t_resource_section = &t_section_headers[t_section_count - 2];
1651+
t_project_section = &t_section_headers[t_section_count - 2];
1652+
t_resource_section = &t_section_headers[t_section_count - 1];
16531653
}
16541654

16551655
// Next we check that there are at least two sections, and they are the

0 commit comments

Comments
 (0)