On Wed, 29 Nov 2023, Antonin Décimo wrote:
Thanks a lot for clarifying. I couldn't find any documentation about this, apart from blog posts [1]
Right, see how the blog post uses #ifdef _M_AMD64 and #ifdef _M_IX86 to strictly distinguish what they mean here.
and related code in Chromium [2]. The first doesn't mention ARM, but both use const_seg on 64-bits arches and data_seg on 32 bits.
I wouldn't really take that as an authority for this matter here - I would expect this to be a similar historical mistake; someone has used _WIN64 to distinguish x86 and x64 at a time when no other architectures were relevant in Windows code.
[1]: https://lallouslab.net/2017/05/30/using-cc-tls-callbacks-in-visual-studio-with-your-32-or-64bits-programs/ [2]: https://chromium.googlesource.com/chromium/src/+/lkgr/base/win/dllmain.cc#64 I'll try to write a sensible repro case and build it on all arches. I don't have ARM Windows machines, I hope that looking at the cross-compiled executable sections will be enough.
Sure, hopefully inspecting that is enough. Otherwise I can help out running any test binaries you want to inspect (you can probably mail me off-list for that).
// Martin _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
