On Tue, 21 Aug 2018, Martin Storsjö wrote:

When exiting due to calling these functions, the expectation is that
normal global object destructors aren't called.

In these cases, MSVC still calls all destructors registered in separate
DLLs, and thread local destructors for the current thread in the EXE
though.

This fixes running LLD linked with mingw-w64. LLD optimizes shutdown
by only doing some minimal cleanup and not running all global destructors,
exiting by calling the _exit function. In this case, the process hangs
if the global destructors actually are called, due to the previous minimal
cleanup that had been run.

Signed-off-by: Martin Storsjö <mar...@martin.st>
---
mingw-w64-crt/crt/cxa_atexit.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)

Ping

// Martin
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to