On Wed, 14 May 2025, LIU Hao wrote:

在 2025-5-14 18:46, Martin Storsjö 写道:
On Fri, 9 May 2025, Pali Rohár wrote:
msvc has more object configuration files which are supposed to be passed
to linker, and they change behavior of the startup code. Documentation:

https://learn.microsoft.com/en-us/cpp/c-runtime-library/link-options

In works in a way that every object file just initialize variable to
some specific value. And all those variables are used by the startup
code which is always linked.

There are some "fallback" object files which are linked when symbols are
not explicitly defined by specifying one of those above object
configuration file, or by the application itself.

If this is the recommended setup for users, I think we should do the same, by providing 'threadlocale.o'. There are already similar objects such as 'binmode.o'.

If user programs do not link with 'threadlocale.obj', the default value seems to be zero?

Sure, something like that sounds reasonable.

What do you think about calling _configthreadlocale with the undocumented parameter -1 here, when we don't have any other reference for the number than "msvc's crt startup seems to do this"?

// Martin

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to