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

2024-09-15 Thread Pali Rohár
Ok, fine. I just wanted to know if the newly reported issue is not something known which will be fixed by your work. On Sunday 15 September 2024 16:35:52 Julian Waters wrote: > Hi Pali, > > Hmm, it doesn't seem to be related, at least on first glance. I'm > working on adding native TLS to gcc, bu

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

2024-09-15 Thread Julian Waters
Hi Pali, Hmm, it doesn't seem to be related, at least on first glance. I'm working on adding native TLS to gcc, but right now it uses software emulated TLS, which is what seems to be broken in that bug. I unfortunately doubt I am competent enough to fix that bug, however :( best regards, Julian

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

2024-09-10 Thread Jacek Caban
Pushed without to master without __imp_ symbol as 37a5ac28da2cea20ded46c24dd4938162d4a6be8. Thanks, Jacek ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

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

2024-09-09 Thread Martin Storsjö
On Mon, 9 Sep 2024, Pali Rohár wrote: On Monday 09 September 2024 09:40:41 Jacek Caban wrote: On 7.09.2024 00:00, Pali Rohár wrote: > So maybe the imp symbol could be included only for gcc/binutils builds? I think that we don't want to introduce differences like that. Ideally, we should be ab

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

2024-09-09 Thread Pali Rohár
Hello Julian, it would be nice if you could take this feature. On Monday 09 September 2024 16:44:55 Julian Waters wrote: > I'm working on gcc and binutils at the moment to add Thread Local Storage > to both, if you all don't mind I'll also add the importing local symbol > feature to my bucket list

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

2024-09-09 Thread Julian Waters
I'm working on gcc and binutils at the moment to add Thread Local Storage to both, if you all don't mind I'll also add the importing local symbol feature to my bucket list as well once I'm done with that best regards, Julian On Mon, Sep 9, 2024 at 4:40 PM Pali Rohár wrote: > On Monday 09 Septem

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

2024-09-09 Thread Pali Rohár
On Monday 09 September 2024 09:40:41 Jacek Caban wrote: > On 7.09.2024 00:00, Pali Rohár wrote: > > So maybe the imp symbol could be included only for gcc/binutils builds? > > > I think that we don't want to introduce differences like that. Ideally, we > should be able to mix tools with crt build

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

2024-09-09 Thread Jacek Caban
On 7.09.2024 00:00, Pali Rohár wrote: So maybe the imp symbol could be included only for gcc/binutils builds? I think that we don't want to introduce differences like that. Ideally, we should be able to mix tools with crt builds with another tools (so, for example, use crt built with GCC wit

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

2024-09-06 Thread Pali Rohár
On Tuesday 03 September 2024 23:52:09 Jacek Caban wrote: > On 3.09.2024 23:15, Pali Rohár wrote: > > On Wednesday 28 August 2024 15:51:46 Jacek Caban wrote: > > > 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

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

2024-09-06 Thread LIU Hao
在 2024-08-28 19:27, Martin Storsjö 写道: I wouldn't maybe go out and adding separate __imp_ symbols for exactly everything, if there are many symbols where we're missing it, if there's no specific use case for it. That the user could declare it themselves with a dllimport attribute isn't strictly

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

2024-09-03 Thread Jacek Caban
On 3.09.2024 23:15, Pali Rohár wrote: On Wednesday 28 August 2024 15:51:46 Jacek Caban wrote: 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 c

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

2024-09-03 Thread Pali Rohár
On Wednesday 28 August 2024 15:51:46 Jacek Caban wrote: > 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 *

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;

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: Fix atexit() function for every import library

2024-08-27 Thread Pali Rohár
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; > > > The patch looks mostly

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

2024-08-27 Thread Jacek Caban
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; The patch looks mostly good to me, but do we need this __imp_ symbol at all? We already decl

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

2024-08-27 Thread Pali Rohár
mingw-w64 startup code already provides its own atexit() functions. Implementation for DLL and EXE builds differs because version for DLL builds has to be called at the time when unloading DLL library whereas version for EXE builds is called at process termination. DLL version of atexit() stores at