File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -551,11 +551,19 @@ static int CommandLineRPC(int argc, char *argv[])
551
551
return nRet;
552
552
}
553
553
554
- int main (int argc, char * argv[])
555
- {
556
554
#ifdef WIN32
555
+ // Export main() and ensure working ASLR on Windows.
556
+ // Exporting a symbol will prevent the linker from stripping
557
+ // the .reloc section from the binary, which is a requirement
558
+ // for ASLR. This is a temporary workaround until a fixed
559
+ // version of binutils is used for releases.
560
+ __declspec (dllexport) int main(int argc, char * argv[])
561
+ {
557
562
util::WinCmdLineArgs winArgs;
558
563
std::tie (argc, argv) = winArgs.get ();
564
+ #else
565
+ int main (int argc, char * argv[])
566
+ {
559
567
#endif
560
568
SetupEnvironment ();
561
569
if (!SetupNetworking ()) {
You can’t perform that action at this time.
0 commit comments