Re: [Mingw-w64-public] [PATCH] crt: Always include load config in mingwex."

2025-03-02 Thread LIU Hao
在 2025-03-03 13:35, LIU Hao 写道: Ideally there should always be a load config directory. If it is compiled into libmingwex then it's not possible to turn it on or off at their disposal. 'their' = of a user who wishes to turn CF Guard on/off GNU binutils does not support load config at the momen

Re: [Mingw-w64-public] [PATCH] crt: Always include load config in mingwex."

2025-03-02 Thread LIU Hao
在 2025-03-02 23:31, Alvin Wong via Mingw-w64-public 写道: Honestly I've never thought about this before, so I just gave it a check on MSVC. Testing with the version I have installed (19.35.32215), by comparing the output of `cl /PD /Zc:preprocessor test.cpp` and `cl /PD /Zc:preprocessor /guard:cf

Re: [Mingw-w64-public] [PATCH v2] crt: Always include load config in mingwex.

2025-03-02 Thread Martin Storsjö
On Sun, 2 Mar 2025, Jacek Caban wrote: On 2.03.2025 21:29, Martin Storsjö wrote: --- a/mingw-w64-crt/cfguard/mingw_cfguard_loadcfg.S +++ b/mingw-w64-crt/crt/loadcfg.S @@ -13,6 +13,12 @@ Many of the symbols referenced here are supplied by the linker. This file has been constructed with LLVM/LL

Re: [Mingw-w64-public] [PATCH v2] crt: Always include load config in mingwex.

2025-03-02 Thread Jacek Caban
On 2.03.2025 21:29, Martin Storsjö wrote: On Sun, 2 Mar 2025, Jacek Caban wrote: This is mandatory on ARM64EC and also required on AArch64 for ARM64X builds. Instead of extending the existing logic, unify it by always including it in mingwex. Fill CF Guard fields with zeroes when CF Guard is

Re: [Mingw-w64-public] [PATCH] crt: Always include load config in mingwex."

2025-03-02 Thread Jacek Caban
On 2.03.2025 10:14, Alvin Wong wrote: On 1/3/2025 20:25, Jacek Caban wrote: This is mandatory on ARM64EC and also required on AArch64 for ARM64X builds. Instead of extending the existing logic, unify it by always including it in mingwex. In practice, this means load config will always be pres

Re: [Mingw-w64-public] [PATCH v2] crt: Always include load config in mingwex.

2025-03-02 Thread Martin Storsjö
On Sun, 2 Mar 2025, Jacek Caban wrote: This is mandatory on ARM64EC and also required on AArch64 for ARM64X builds. Instead of extending the existing logic, unify it by always including it in mingwex. Fill CF Guard fields with zeroes when CF Guard is not enabled in CRT builds. This leverages

[Mingw-w64-public] [PATCH v2] crt: Always include load config in mingwex.

2025-03-02 Thread Jacek Caban
This is mandatory on ARM64EC and also required on AArch64 for ARM64X builds. Instead of extending the existing logic, unify it by always including it in mingwex. Fill CF Guard fields with zeroes when CF Guard is not enabled in CRT builds. This leverages existing LLD load config validation warnin

Re: [Mingw-w64-public] [PATCH] crt: Always include load config in mingwex."

2025-03-02 Thread Alvin Wong via Mingw-w64-public
(Resending since SF rejected my original message) On 2/3/2025 22:21, Martin Storsjö wrote: I guess there's no prepreocessor define we can check in loadcfg.S, so we'd need to pass one from the build system, when building with --enable-cfguard, which can be used to switch between including or

Re: [Mingw-w64-public] [PATCH] include: Add missing float.h declarations.

2025-03-02 Thread Jacek Caban
On 2.03.2025 00:22, Martin Storsjö wrote: On Sat, 1 Mar 2025, Jacek Caban wrote: --- mingw-w64-headers/crt/float.h | 14 ++ 1 file changed, 14 insertions(+) LGTM, this looks ok to me. Pushed, thanks. Jacek ___ Mingw-w64-public mai

Re: [Mingw-w64-public] stat, _stat, and _stat64i32 issues (was: dirent changes)

2025-03-02 Thread Lasse Collin
On 2025-02-27 Pali Rohár wrote: > I did not wanted to open also this discussion about stat, but as you > have opened it, I write some important details, which needs to be > taken into account, otherwise another breakage can happen. Thank you for writing it! It is useful. I apologize if opening thi

Re: [Mingw-w64-public] [PATCH] crt: Always include load config in mingwex."

2025-03-02 Thread Martin Storsjö
On Sun, 2 Mar 2025, Alvin Wong wrote: On 1/3/2025 20:25, Jacek Caban wrote: This is mandatory on ARM64EC and also required on AArch64 for ARM64X builds. Instead of extending the existing logic, unify it by always including it in mingwex. In practice, this means load config will always be pre

Re: [Mingw-w64-public] dirent changes

2025-03-02 Thread Lasse Collin
On 2025-02-28 Lasse Collin wrote: > On 2025-02-25 Pali Rohár wrote: > > On Tuesday 25 February 2025 20:11:12 Lasse Collin wrote: > > > While \\?\...\Partition3 without trailing \ isn't a directory, I > > > more and more think that it doesn't matter too much if opendir > > > works on it still. It'

Re: [Mingw-w64-public] [PATCH] crt: Always include load config in mingwex."

2025-03-02 Thread Alvin Wong via Mingw-w64-public
On 1/3/2025 20:25, Jacek Caban wrote: This is mandatory on ARM64EC and also required on AArch64 for ARM64X builds. Instead of extending the existing logic, unify it by always including it in mingwex. In practice, this means load config will always be present in output images when using LLD. Si