Re: [Mingw-w64-public] [PATCH] crt: Define init_scprintf() as C function with inline assembly

2024-08-28 Thread Pali Rohár
On Wednesday 28 August 2024 14:23:40 Martin Storsjö wrote: > On Wed, 28 Aug 2024, LIU Hao wrote: > > > 在 2024-08-28 03:15, Pali Rohár 写道: > > > Use gcc's function attribute naked which omits any prologue or epilogue > > > sequences and for x86 is supported by gcc since version 8.0.0. It is also >

Re: [Mingw-w64-public] [PATCH] crt: Fix return value of IMAGE_TLS_CALLBACK functions and remove explicit pointer casting

2024-08-28 Thread Pali Rohár
On Wednesday 28 August 2024 14:17:08 Martin Storsjö wrote: > On Wed, 28 Aug 2024, LIU Hao wrote: > > > 在 2024-08-28 03:15, Pali Rohár 写道: > > > -BOOL WINAPI __dyn_tls_init (HANDLE, DWORD, LPVOID); > > > - > > > -BOOL WINAPI > > > +static void WINAPI > > > __dyn_tls_init (HANDLE hDllHandle, DWORD

Re: [Mingw-w64-public] [PATCH] doc: ucrt-vs-msvcrt.txt: Update information about CRT options and links how to obtain UCRT

2024-08-28 Thread Jacek Caban
On 28.08.2024 13:42, Martin Storsjö wrote: From: Pali Rohár --- I tried removing some of the extra verbosity, while keeping the core of the added information, and adjusting wording a little bit. Looks good to me. Thanks, Jacek ___ Mingw-w64-publ

Re: [Mingw-w64-public] [PATCH] crt: Fix atexit() function for every import library

2024-08-28 Thread Jacek Caban
On 27.08.2024 23:35, Pali Rohár wrote: On Tuesday 27 August 2024 23:20:23 Jacek Caban wrote: On 27.08.2024 21:16, Pali Rohár wrote: +/* define just import symbol, function itself is in crtexe.c and crtdll.c files */ +int (__cdecl *__MINGW_IMP_SYMBOL(atexit))(void (__cdecl *)(void)) = atexit;

[Mingw-w64-public] [PATCH] doc: ucrt-vs-msvcrt.txt: Update information about CRT options and links how to obtain UCRT

2024-08-28 Thread Martin Storsjö
From: Pali Rohár --- I tried removing some of the extra verbosity, while keeping the core of the added information, and adjusting wording a little bit. --- mingw-w64-doc/howto-build/ucrt-vs-msvcrt.txt | 31 +--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/mingw

Re: [Mingw-w64-public] [PATCH] doc: ucrt-vs-msvcrt.txt: Update information about CRT options and links how to obtain UCRT

2024-08-28 Thread Martin Storsjö
On Tue, 27 Aug 2024, Pali Rohár wrote: On Tuesday 27 August 2024 23:13:08 Jacek Caban wrote: On 27.08.2024 21:14, Pali Rohár wrote: > -ucrt (utilizing ucrtbase.dll) and msvcrt (utilizing msvcrt.dll). > +ucrt (utilizing api-ms-win-crt-*.dll) and msvcrt (utilizing msvcrt.dll). In my opinion men

Re: [Mingw-w64-public] [PATCH] crt: Fix atexit() function for every import library

2024-08-28 Thread Martin Storsjö
On Tue, 27 Aug 2024, Pali Rohár wrote: On Tuesday 27 August 2024 23:20:23 Jacek Caban wrote: On 27.08.2024 21:16, Pali Rohár wrote: > +/* define just import symbol, function itself is in crtexe.c and crtdll.c files */ > +int (__cdecl *__MINGW_IMP_SYMBOL(atexit))(void (__cdecl *)(void)) = atexi

Re: [Mingw-w64-public] [PATCH] crt: Define init_scprintf() as C function with inline assembly

2024-08-28 Thread Martin Storsjö
On Wed, 28 Aug 2024, LIU Hao wrote: 在 2024-08-28 03:15, Pali Rohár 写道: Use gcc's function attribute naked which omits any prologue or epilogue sequences and for x86 is supported by gcc since version 8.0.0. It is also supported by clang. For older gcc versions use existing code. This change fix

Re: [Mingw-w64-public] [PATCH] crt: Fix return value of IMAGE_TLS_CALLBACK functions and remove explicit pointer casting

2024-08-28 Thread Martin Storsjö
On Wed, 28 Aug 2024, LIU Hao wrote: 在 2024-08-28 03:15, Pali Rohár 写道: -BOOL WINAPI __dyn_tls_init (HANDLE, DWORD, LPVOID); - -BOOL WINAPI +static void WINAPI __dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) { `__dyn_tls_init()` has external linkage in Microsoft CRT,