Merge b91055ea55 into merged_master (Bitcoin PR bitcoin/bitcoin#25251)

This commit is contained in:
James Dorfman 2024-09-10 18:10:02 +00:00
commit 1e24510c7e
7 changed files with 26 additions and 24 deletions

View file

@ -9,6 +9,7 @@
#include <chainparamsbase.h>
#include <clientversion.h>
#include <compat.h>
#include <compat/stdin.h>
#include <policy/feerate.h>
#include <rpc/client.h>
@ -1212,19 +1213,11 @@ static int CommandLineRPC(int argc, char *argv[])
return nRet;
}
#ifdef WIN32
// Export main() and ensure working ASLR on Windows.
// Exporting a symbol will prevent the linker from stripping
// the .reloc section from the binary, which is a requirement
// for ASLR. This is a temporary workaround until a fixed
// version of binutils is used for releases.
__declspec(dllexport) int main(int argc, char* argv[])
MAIN_FUNCTION
{
#ifdef WIN32
util::WinCmdLineArgs winArgs;
std::tie(argc, argv) = winArgs.get();
#else
int main(int argc, char* argv[])
{
#endif
SetupEnvironment();
if (!SetupNetworking()) {