On Wed, 27 Nov 2024, Pali Rohár wrote:
For EXE builds __mingw_init_ehandler() function is called after the
_pei386_runtime_relocator() from the __tmainCRTStartup() (and not from the
WinMainCRTStartup() function).
Do same for DLL builds and call __mingw_init_ehandler() from
__DllMainCRTStartup() instead of DllMainCRTStartup().
---
mingw-w64-crt/crt/crtdll.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
I think this change might be ok, but it would be nice to explain a bit
about the motivation for the change; is this something that you've
functionally noticed that needs to be tweaked, or just that you noticed
that it was inconsistent? (And in this case, explain your reasoning why
you think this is the wrong location to call it and why crtexe.c's place
is more correct.)
It's also good to point out that this is called within "x86_64 && !SEH",
i.e. x86_64 builds with DWARF instead of SEH - which I would believe are
rather rare nowadays. (So I think practically that very few toolchains
would have even compile tested this codepath in recent years.)
// Martin
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public