From fbae8c59a2c3f102828a91ee0dbd6017daa1f4fb Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 30 May 2022 15:59:43 +0100 Subject: compat: Consolidate mingw-w64 ASLR workaround for upstream libsecp changes Achieve this by adding a MAIN_FUNCTION macro, consolidating the docs, and introducing the macro across our distributed binaries. Also update the docs to explain that anyone using binutils < 2.36 is effected by this issue. Release builds are not, because they use binutils 2.37. Currently LTS Linux distros, like Ubuntu Focal, ship with 2.34. https://packages.ubuntu.com/focal/binutils --- src/bitcoin-wallet.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/bitcoin-wallet.cpp') diff --git a/src/bitcoin-wallet.cpp b/src/bitcoin-wallet.cpp index 2f3dd45267..7bec3292a1 100644 --- a/src/bitcoin-wallet.cpp +++ b/src/bitcoin-wallet.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -88,7 +89,7 @@ static bool WalletAppInit(ArgsManager& args, int argc, char* argv[]) return true; } -int main(int argc, char* argv[]) +MAIN_FUNCTION { ArgsManager& args = gArgs; #ifdef WIN32 -- cgit v1.2.3