On 20.03.2025 23:24, Martin Storsjö wrote:
This reverts commit 91459ac35276522b0e4405c76795d91822bb395a.

That commit was a workaround for older binutils or LLD versions,
that would otherwise autoexport symbols from the CRT libraries.

Since 9d9c67b06c1bf4c4550e3de0eb575c2bfbe96df9 in binutils (in 2017),
binutils does exclude "libmsvcrt", "libmsvcrt-os" and "libucrtbase"
from autoexport; likewise, LLD also learnt to exclude "libmsvcrt"
and "libucrtbase" in 6bde1667bac6d474c70cdcf3f2388d32726f76b7
in 2017. So by now, it should be more than safe to remove the
workaround. (And even with older linkers, the only issue is that
more symbols than wanted are autoexported.)

Therefore, revert this workaround, to stop providing __imp_ prefixed
symbols for symbols that aren't accessed with dllimport anywhere.

Not all symbols that were added in that commit are removed; ones
declared in public or internal headers as _CRTIMP are kept.

Also remove similar cases in new ucrt_*.c files that have been
added since. All such cases are removed except for _vscprintf,
as that function uses a declaration with _CRTIMP even for UCRT.
---
  mingw-w64-crt/misc/ucrt_tzset.c        | 3 ---
  mingw-w64-crt/stdio/ucrt__scprintf.c   | 1 -
  mingw-w64-crt/stdio/ucrt__snprintf.c   | 1 -
  mingw-w64-crt/stdio/ucrt__snscanf.c    | 1 -
  mingw-w64-crt/stdio/ucrt__snwprintf.c  | 2 --
  mingw-w64-crt/stdio/ucrt__vsnprintf.c  | 1 -
  mingw-w64-crt/stdio/ucrt__vsnwprintf.c | 1 -
  mingw-w64-crt/stdio/ucrt_fprintf.c     | 1 -
  mingw-w64-crt/stdio/ucrt_fscanf.c      | 1 -
  mingw-w64-crt/stdio/ucrt_fwprintf.c    | 2 --
  mingw-w64-crt/stdio/ucrt_ms_fprintf.c  | 1 -
  mingw-w64-crt/stdio/ucrt_ms_fwprintf.c | 1 -
  mingw-w64-crt/stdio/ucrt_printf.c      | 1 -
  mingw-w64-crt/stdio/ucrt_scanf.c       | 1 -
  mingw-w64-crt/stdio/ucrt_snprintf.c    | 1 -
  mingw-w64-crt/stdio/ucrt_sprintf.c     | 1 -
  mingw-w64-crt/stdio/ucrt_sscanf.c      | 2 --
  mingw-w64-crt/stdio/ucrt_vfprintf.c    | 1 -
  mingw-w64-crt/stdio/ucrt_vfscanf.c     | 1 -
  mingw-w64-crt/stdio/ucrt_vprintf.c     | 1 -
  mingw-w64-crt/stdio/ucrt_vscanf.c      | 1 -
  mingw-w64-crt/stdio/ucrt_vsnprintf.c   | 1 -
  mingw-w64-crt/stdio/ucrt_vsprintf.c    | 1 -
  mingw-w64-crt/stdio/ucrt_vsscanf.c     | 1 -
  24 files changed, 29 deletions(-)


LGTM.


Thanks,

Jacek



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to