crt: Make tls_atexit run before __mingw_TLScallback

If libgcc was built with the win32 thread model, the emutls allocations
are freed via __mingw_TLScallback, which is hooked up at .CRT$XLD;
move the tls_atexit callback before this, to make sure TLS destructors
are run before their memory is freed by emutls.

Signed-off-by: Martin Storsjö <martin@martin.st>
1 file changed